Thanks for your great work writing this package! I've been exploring it for use with multi-modal probability distributions, and have stumbled over the following issue while plotting results.
By default, the plot size for runplot is very large (16 by 16), so I thought I'd make it smaller by passing in my own (fig, axes) objects. However, when doing so, the following TypeError
TypeError: '<' not supported between instances of 'NoneType' and 'float'
is thrown by line 229 in plotting.py. A short investigation revealed that when the limits of the x- and y-axis are (0,1), they are replaced by (None, None), which breaks the min() and max() statements in the following line.
replace min() and max() by their numpy versions, which will not throw a TypeError, but return whatever the other value is
If this should fail, perhaps throw a more meaningful exception here that gives the user some guidance for what the limits of the x- and y-axes should be
I think one could also pull down rows 209 and 210 and execute them after the if-else statement creating the plots, in which case the behaviour for both would be the same.
Anyway, happy to submit a pull request, I just wanted to check first what behaviour you expect here. :)
Good find. I'm more than happy to take pull requests for any/all of the proposed solutions. Otherwise, I'll try and fix this during my next batch of changes in ~1 week.
Thanks for your great work writing this package! I've been exploring it for use with multi-modal probability distributions, and have stumbled over the following issue while plotting results.
By default, the plot size for
runplot
is very large (16 by 16), so I thought I'd make it smaller by passing in my own(fig, axes)
objects. However, when doing so, the followingTypeError
is thrown by line 229 in plotting.py. A short investigation revealed that when the limits of the x- and y-axis are (0,1), they are replaced by
(None, None)
, which breaks themin()
andmax()
statements in the following line.Minimum example:
A couple of possible solutions I could think of:
min()
andmax()
by their numpy versions, which will not throw a TypeError, but return whatever the other value isAnyway, happy to submit a pull request, I just wanted to check first what behaviour you expect here. :)