-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create markdown representation #986
Conversation
Should I only do |
It's just a loop over strings, right? Just add all supported formats, including mime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Straightforward PR.
|
||
// Find the MPE | ||
for(DiscreteValues& frontalVals: allPosbValues) { | ||
for(const auto& frontalVals: allPosbValues) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment: auto&&
will automatically take care of constness.
767a74718 Merge pull request #142 from borglab/python/repr-methods 1cbbd7757 make the repr method generation much simpler b154ed0ba add support for special ipython methods and do some refactoring f0f72283d update test fixtures git-subtree-dir: wrap git-subtree-split: 767a74718e25aa9fa8831e99ce7c459f216043cf
_repr_markdown_ -> markdown
Cool, thanks for joint effort! I will merge after CI passes. |
Woohoo |
This PR adds markdown formatting for discrete factors and conditionals. Main new functions are
DiscreteConditional::_repr_markdown_
DecisionTreeFactor::_repr_markdown_
These method names are not very c++ like but work in python notebooks as is. Waiting for a PR in wrap so we can rename them to "markdown", in analogy to "dot". @varunagrawal :-)
An example:
Key formatters are supported but need a bit more machinery on python side, e.g.,