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 plotting 2d arrays (not caught by unit tests) #783

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

thehrh
Copy link
Contributor

@thehrh thehrh commented Jul 26, 2024

At least in matplotlib 3.8.4, plt.subplot doesn't accept a float for the number of rows/columns, only an integer. This leads to exceptions when trying to run scripts distribution_maker.py, kde_hist.py, etc. with plotting activated. I believe only the unit test for kde_hist.py could have caught this, but it fails due to the missing (but accepted) pycuda dependency already.

It doesn't seem worth checking whether previous versions of matplotlib were more lenient, because passing an integer is surely backwards compatible, isn't it? I've also removed the very old TODO in the line above because there is an automatic row/column setup...

…bly no longer?) accepted by plt.subplot in matplotlib 3.8.4
@thehrh thehrh added the bug label Jul 26, 2024
Copy link
Collaborator

@philippeller philippeller left a comment

Choose a reason for hiding this comment

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

looking good - trivial fix

@philippeller philippeller merged commit 6ad2b2b into icecube:master Jul 28, 2024
2 checks passed
@thehrh thehrh deleted the plotter_int_nrows_fix branch August 1, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants