Skip to content

Conversation

kadirnar
Copy link
Contributor

Error Message:

AttributeError: module 'numpy' has no attribute 'float'

Fix:

import numpy as np

# Instead of numpy's float alias
x = np.float(10)

# Use the built-in float
x = float(10)

Reference:
https://levelup.gitconnected.com/fix-attributeerror-module-numpy-has-no-attribute-float-d7d68c5a4971

@dyhBUPT
Copy link
Owner

dyhBUPT commented Jan 26, 2023

Hi, thanks very much for your PR!
I'll merge it.
Looking forward to your more suggestions or PRs.

@dyhBUPT dyhBUPT merged commit 8bdf8ad into dyhBUPT:master Jan 26, 2023
@kadirnar kadirnar deleted the numpy_1_24 branch January 30, 2023 13:42
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.

2 participants