You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using this package for a few months and it's great! However, I recently reinstalled anaconda, and I'm now encountering a problem with setting axes limits in my ternary plots.
Now, every time I call tax.get_ticks_from_axis_limits(), I get an error from linspace: "TypeError: object of type <class 'float'> cannot be safely interpreted as an integer." I was able to reproduce this error just by running the custom_axis_scaling.py script in the examples folder.
The problem seems to be that when numpy.linspace(start, stop, num) is called in tax.get_ticks_from_axis_limits(), the num parameter is a float, but linspace wants an integer. It appears that linspace used to convert floats to ints automatically but no longer does (?) - see here.
I seemed to be able to fix the problem by converting the num parameter to an integer within the tax.get_ticks_from_axis_limits() function, e.g.: int(self._boundary_scale / float(multiple) + 1)
I hope this might be helpful, or please let me know if you think I've misunderstood something!
The text was updated successfully, but these errors were encountered:
Hi there,
I've been using this package for a few months and it's great! However, I recently reinstalled anaconda, and I'm now encountering a problem with setting axes limits in my ternary plots.
Now, every time I call
tax.get_ticks_from_axis_limits()
, I get an error from linspace:"TypeError: object of type <class 'float'> cannot be safely interpreted as an integer."
I was able to reproduce this error just by running thecustom_axis_scaling.py
script in the examples folder.The problem seems to be that when
numpy.linspace(start, stop, num)
is called intax.get_ticks_from_axis_limits()
, the num parameter is a float, butlinspace
wants an integer. It appears thatlinspace
used to convert floats to ints automatically but no longer does (?) - see here.I seemed to be able to fix the problem by converting the
num
parameter to an integer within thetax.get_ticks_from_axis_limits()
function, e.g.:int(self._boundary_scale / float(multiple) + 1)
I hope this might be helpful, or please let me know if you think I've misunderstood something!
The text was updated successfully, but these errors were encountered: