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

Bug: Changed float to float64 for newer numpy #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vltmedia
Copy link

Numpy 1.23+ was crashing because of the np.float value.
This fixes the possible crash/block using the recommended change.

Error:

File "f:\Env\Lib\site-packages\numpy\__init__.py
", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in e
xisting code, use `float` by itself. Doing this will not modify any behavior and is
 safe. If you specifically wanted the numpy scalar type, use `np.float64` 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

Numpy 1.23+ was crashing because of the np.float value.
@woctezuma
Copy link
Contributor

np.float was a deprecated alias for the builtin float. To avoid this error in e
xisting code, use float by itself. Doing this will not modify any behavior and is
safe. If you specifically wanted the numpy scalar type, use np.float64 here.

Thanks! I don't know what is better: float or np.float64. Maybe the former as suggested by the error message?

@vltmedia
Copy link
Author

Yup no problem! It seems np.float64 get's through it on all of computers we tested on so I'd go with that for compatibility.

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

Successfully merging this pull request may close these issues.

None yet

2 participants