PyEIS
PyEIS copied to clipboard
Numpy Type Error when using freq_gen function
Running the second line in the Jupyter notebook tutorial "PyEIS_simulation_tutorial" results in a Type Error:
TypeError: 'numpy.float64' object cannot be interpreted as an integer
Can be traced back to line 62 in PyEIS.py: f_range = np.logspace(np.log10(f_start), np.log10(f_stop), num=np.around(pts_decade*f_decades), endpoint=True)
Where np.around() passes a float to number of points in np.logspace
Could you please attach versions of numpy and python, that you're currently using
After updating my Python environment, I got a similar problem with a script, which was previously running fine. Now versions are numpy 1.18.1 and python 3.7.6.
Thank you Kristian for providing PyEIS!
I have the same Problem
Python 3.7.5 numpy 1.18.2
Solution is to change PyEis.py line 60 to this
f_range = np.logspace(np.log10(f_start), np.log10(f_stop), num=np.around(pts_decade*f_decades).astype(int), endpoint=True)
Solution is to change PyEis.py line 60 to this
f_range = np.logspace(np.log10(f_start), np.log10(f_stop), num=np.around(pts_decade*f_decades).astype(int), endpoint=True)
Thank you @C4rst3n - the solution worked for me!
Thanks @C4rst3n your solution worked for me too.