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

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

Open
Lucas-Wye opened this issue Nov 26, 2023 · 0 comments
Open

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

Lucas-Wye opened this issue Nov 26, 2023 · 0 comments

Comments

@Lucas-Wye
Copy link

Lucas-Wye commented Nov 26, 2023

Cannot work with librosa 0.8.0 as specified by setup.py.

    from . import datasets, models, text
  File "/home/mandarin/mtts/models/__init__.py", line 1, in <module>
    from . import decoder, encoder, postnet, vocoder
  File "/home/mandarin/mtts/models/vocoder/__init__.py", line 1, in <module>
    from .hifi_gan import HiFiGAN
  File "/home/mandarin/mtts/models/vocoder/hifi_gan/__init__.py", line 1, in <module>
    from .hifi_gan import HiFiGAN
  File "/home/mandarin/mtts/models/vocoder/hifi_gan/hifi_gan.py", line 11, in <module>
    from .meldataset import MAX_WAV_VALUE
  File "/home/mandarin/mtts/models/vocoder/hifi_gan/meldataset.py", line 7, in <module>
    from librosa.util import normalize
  File "/home/mandarin/venv/lib/python3.8/site-packages/librosa/__init__.py", line 211, in <module>
    from . import core
  File "/home/mandarin/venv/lib/python3.8/site-packages/librosa/core/__init__.py", line 9, in <module>
    from .constantq import *  # pylint: disable=wildcard-import
  File "/home/mandarin/venv/lib/python3.8/site-packages/librosa/core/constantq.py", line 1059, in <module>
    dtype=np.complex,
  File "/home/mandarin/venv/lib/python3.8/site-packages/numpy/__init__.py", line 305, 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
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