Skip to content
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

fix: repr limit and fallback on normal repr #388

Merged
merged 1 commit into from Mar 10, 2022
Merged

Conversation

henryiii
Copy link
Member

@henryiii henryiii commented Mar 10, 2022

Closes #379 . Also fixes an issue with an empty histogram breaking by not initializing. This adds a hardcoded limit on the SVG size, 1000 for 1D and 200 in either diminsion for 2D (can increase if we move to using a bitmap). Closes #380. We could make this configurable possibly, but a hard limit is just fine at the moment too - you can always plot, this is just a visual helper.

@henryiii henryiii force-pushed the henryiii/fix/repr branch 2 times, most recently from 345c0f8 to a2b518e Compare March 10, 2022 22:26
@@ -87,37 +87,37 @@ def __init__(
for a in args
]

if args:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just completely removed this if, wasn't needed, and it caused the super().__init__ to never get called.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(If you hide whitespace in the GitHub diff, you'll see basically nothing changed really here except this line)

@henryiii henryiii merged commit 9f4c5d3 into main Mar 10, 2022
@henryiii henryiii deleted the henryiii/fix/repr branch March 10, 2022 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Display can crash if histogram really large. chore: convert to mime bundle for IPython reprs
1 participant