'AttributeError: 'MachAr' object has no attribute 'smallest_subnormal'

When importing librosa library, this error has occurred.

C:\Users\jssong\anaconda3\envs\tensor_v2\lib\site-packages\numpy\core\getlimits.py:492: UserWarning: Signature b'\x9a\x99\x99\x99\x99\x99\xb9\xbf' for <class 'numpy.float64'> does not match any known type: falling back to type probe function   -32768 Traceback (most recent call last):

  File "C:\Users\jssong\AppData\Local\Temp/ipykernel_9264/3412492946.py", line 1, in <module>
    eps = np.finfo(float).eps

  File "C:\Users\jssong\anaconda3\envs\tensor_v2\lib\site-packages\numpy\core\getlimits.py", line 485, in __new__

  File "C:\Users\jssong\anaconda3\envs\tensor_v2\lib\site-packages\numpy\core\getlimits.py", line 499, in _init
    2147483647

AttributeError: 'MachAr' object has no attribute 'smallest_subnormal'

so i tracking this error i found this code.

eps = np.finfo(float).eps

The same error occurs when only running this code.

And as a result of searching for finfo , the same error occurred in the example code that other web site.

how can i solve this error?

numpy version is 1.22.1



Solution 1:[1]

I'm not sure that my case is general, but cleaning up of the ~/.local/lib and ~/.local/bin directories against old python files helped to get rid the issue.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Val