icecube / pisa

Monte Carlo-based data analysis
http://icecube.github.io/pisa/
Apache License 2.0
19 stars 47 forks source link

fix plotting 2d arrays (not caught by unit tests) #783

Closed thehrh closed 1 month ago

thehrh commented 1 month ago

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...