Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plotspectrum_V4a.py np.complex deprecated #1

Open
ve3gtc opened this issue Feb 24, 2024 · 0 comments
Open

plotspectrum_V4a.py np.complex deprecated #1

ve3gtc opened this issue Feb 24, 2024 · 0 comments

Comments

@ve3gtc
Copy link

ve3gtc commented Feb 24, 2024

plotspectrum_V4a.py", line 126, in
bigarray = np.zeros(1474560,dtype=np.complex)

File "/numpy/init.py", line 324, in getattr
raise AttributeError(former_attrs[attr])

AttributeError: module 'numpy' has no attribute 'complex'.

np.complex was a deprecated alias for the builtin complex. To avoid this error in existing code, use complex by itself. Doing this
will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128 here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'complex_'?

line 126 changed to

bigarray = np.zeros(1474560,dtype=np.complex128)

and all appears to OK.

cheers, Graham

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant