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

What to do , i dont get it . Help! #1281

Open
iWEDX opened this issue Jan 6, 2024 · 1 comment
Open

What to do , i dont get it . Help! #1281

iWEDX opened this issue Jan 6, 2024 · 1 comment

Comments

@iWEDX
Copy link

iWEDX commented Jan 6, 2024

(harry) C:\Users\Cookie\Desktop\iam>
(harry) C:\Users\Cookie\Desktop\iam>python demo_toolbox.py
C:\Users\Cookie\Desktop\iam\encoder\audio.py:13: UserWarning: Unable to import 'webrtcvad'. This package enables noise removal and is recommended.
warn("Unable to import 'webrtcvad'. This package enables noise removal and is recommended.")
Traceback (most recent call last):
File "C:\Users\Cookie\Desktop\iam\demo_toolbox.py", line 5, in
from toolbox import Toolbox
File "C:\Users\Cookie\Desktop\iam\toolbox_init_.py", line 11, in
from toolbox.ui import UI
File "C:\Users\Cookie\Desktop\iam\toolbox\ui.py", line 37, in
], dtype=np.float) / 255
File "C:\Users\Cookie\anaconda3\envs\harry\lib\site-packages\numpy_init_.py", line 284, in getattr
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'float'

@radadiavasu
Copy link

radadiavasu commented Mar 12, 2024

Bro, np.float is a deprecated alias for the built in float. To silence this warning, 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. Deprecated in NumPy 1.20; for more details and guidance: numpy.org/devdocs/release/1.20.0-notes.html#deprecations(https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations)

This was the standard python float object, but as mentioned, numpy.float has been deprecated... and removed in 1.24. You can either use float or pick one of the np.float32, np.float64, np.float128.

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