It was supposedly fixed in response to this issue report here.
And I know how to get it working for now in fresh sessions via MyBinder:
The additional trick NOW, beyond what is stated here, is you need to specify numpy>=1.10.4 but not 2.0 or above. If you use numpy 2.0 or above, you get AttributeError: np.string_was removed in the NumPy 2.0 release. Usenp.bytes_ instead..
I found v1.26.4 is just fine and here is how you can test using hypertools animation via sessions on MyBinder right now:
-
Go here and click on
launch binderto get a session with ipympl already installed. -
When the session comes up, open a new terminal window using the launcher & run in the terminal the following:
pip install numpy==1.26.4 -
Next in that terminal run the following, based on the advice given here:
pip install git+https://github.com/ContextLab/hypertools.git -
Now using the launcher open a new Jupyter Notebook and in the first cell paste this code and run it:
%matplotlib ipympl import math import hypertools as hyp import numpy as np arr = np.array( [[math.sin(3*i/100), math.cos (3*i/100), (1/100)**2, (i/100)**3, 1/(1+i/100)] for i in range(0,300)]) hyp.plot(arr, animate=True)You’ll see an animation!
Alternatively, you can go here and use Jeremy Tuloup’s (jtpio) related gist to launch a MyBinder session that doesn’t include ipympl already installed. (As of September 2024 it also has older Python; currently 3.10.14, but it works fine with this process.) Then follow the steps above, until you get to through step #3. You’ll just need to do a hard refresh in the browser window after the step pip install git+https://github.com/ContextLab/hypertools.git, which includes installing ipympl, and before launching a new notebook. That refresh step in Chrome on a Mac is Command + Shift R. I think on Windows it is Shift + F5. Then after the refresh, you can finish the steps above in that session.