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
But computing the fixed points in the 3rd code segment throws the following error:
Traceback (most recent call last):
File "", line 12, in
fp_coord = pp.find_fixedpoints(vdp, n=4, eps=1e-8)[0]
File "/Users/shibabrat/anaconda/lib/python3.6/site-packages/PyDSTool-0.90.2-py3.6.egg/PyDSTool/Toolbox/phaseplane.py", line 1350, in find_fixedpoints
x0 = array([x0_coords[i][d_posns[i]] for i in range(D)])
File "/Users/shibabrat/anaconda/lib/python3.6/site-packages/PyDSTool-0.90.2-py3.6.egg/PyDSTool/Toolbox/phaseplane.py", line 1350, in
x0 = array([x0_coords[i][d_posns[i]] for i in range(D)])
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices
Can someone kindly direct me on how to resolve this issue? I am running this test on the clone of the github repo.
Thanks,
Naik
The text was updated successfully, but these errors were encountered:
I played around with the source code and it appears the d_posns is the issue. It is a float array that is being used in line 1350 (in phaseplane.py) to index x0_coords, which is causing the index error. I don't know a whole lot of what the code is doing, but when I place int(d_posns[i]) in as the index it solves my problem. I can't guarantee this is a fix but I know it worked because I get the same answer for fixed points in pplane for Matlab.
I am running in exactly the same issue, numpy >= 1.?? requires strictly integer arrays as indexers. It seems as if PyDSTool for python3 does not respect this atm.
As 'd_posns' is an instance of the 'base_n_counter' class in phaseplane.py, I changed:
I am replicating the results in the tutorial here
http://www.ni.gsu.edu/~rclewley/PyDSTool/Tutorial/Tutorial_VdP.html
But computing the fixed points in the 3rd code segment throws the following error:
Traceback (most recent call last):
File "", line 12, in
fp_coord = pp.find_fixedpoints(vdp, n=4, eps=1e-8)[0]
File "/Users/shibabrat/anaconda/lib/python3.6/site-packages/PyDSTool-0.90.2-py3.6.egg/PyDSTool/Toolbox/phaseplane.py", line 1350, in find_fixedpoints
x0 = array([x0_coords[i][d_posns[i]] for i in range(D)])
File "/Users/shibabrat/anaconda/lib/python3.6/site-packages/PyDSTool-0.90.2-py3.6.egg/PyDSTool/Toolbox/phaseplane.py", line 1350, in
x0 = array([x0_coords[i][d_posns[i]] for i in range(D)])
IndexError: only integers, slices (
:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indicesCan someone kindly direct me on how to resolve this issue? I am running this test on the clone of the github repo.
Thanks,
Naik
The text was updated successfully, but these errors were encountered: