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 tried creating a rangeslider under ipyplot.imshow by passing a keyword argument ("r", 1., 99., 99). When I actuate the slider, I get a complicated traceback and nothing happens. Here's a simple example to reproduce. I was trying to create a percentile based contrast slider.
I get a traceback like this when I move the sliders:
Traceback (most recent call last):
File "anaconda/envs/whatever/lib/python3.8/site-packages/matplotlib/cbook/__init__.py", line 224, in process
func(*args, **kwargs)
File "anaconda/envs/whatever/lib/python3.8/site-packages/mpl_interactions/helpers.py", line 394, in changeify
update({"new": val})
File "anaconda/envs/whatever/lib/python3.8/site-packages/mpl_interactions/controller.py", line 182, in slider_updated
self._slider_updated(change, key, values)
File "anaconda/envs/whatever/lib/python3.8/site-packages/mpl_interactions/controller.py", line 156, in _slider_updated
self.params[key] = values[int(change["new"])]
TypeError: only size-1 arrays can be converted to Python scalars
Version Info
I saw this bug on 0.17.0 and 0.17.1
The text was updated successfully, but these errors were encountered:
I think this would have been naturally fixed by #189 but definitely deserves a fix sooner than that will be finished.
This seems to be an issue only with matplotlib sliders as they don't use tuples for their .val attribute and instead use numpy arrays - which is my fault because I wrote them :(
This was introduced by #155 which added the int casting for backwards compatibility with more numpy versions.
Bug report
I tried creating a rangeslider under
ipyplot.imshow
by passing a keyword argument("r", 1., 99., 99)
. When I actuate the slider, I get a complicated traceback and nothing happens. Here's a simple example to reproduce. I was trying to create a percentile based contrast slider.I get a traceback like this when I move the sliders:
Version Info
I saw this bug on
0.17.0
and0.17.1
The text was updated successfully, but these errors were encountered: