FFHT icon indicating copy to clipboard operation
FFHT copied to clipboard

RuntimeError: PyArray_GetArrayParamsFromObject() C-API function is removed

Open thomasahle opened this issue 3 years ago • 2 comments

I installed FFHT with Python 3.9 and got this error when trying to run example.py:

$ py example.py
Traceback (most recent call last):
  File "/Users/ahle/Dropbox (Meta)/kode/ts/FFHT/example.py", line 14, in <module>
    ffht.fht(a)
RuntimeError: PyArray_GetArrayParamsFromObject() C-API function is removed `PyArray_FromAny()` should be used at this time.  New C-API may be exposed in the future (please do request this if it would help you).

I'm on numpy version 1.21.3.

The API seems to have been depriated in 1.19: https://numpy.org/devdocs/release/1.19.0-notes.html#deprecation-of-probably-unused-c-api-functions

thomasahle avatar Dec 05 '21 07:12 thomasahle

I installed FFHT with Python 3.9 and got this error when trying to run example.py:

$ py example.py
Traceback (most recent call last):
  File "/Users/ahle/Dropbox (Meta)/kode/ts/FFHT/example.py", line 14, in <module>
    ffht.fht(a)
RuntimeError: PyArray_GetArrayParamsFromObject() C-API function is removed `PyArray_FromAny()` should be used at this time.  New C-API may be exposed in the future (please do request this if it would help you).

I'm on numpy version 1.21.3.

The API seems to have been depriated in 1.19: https://numpy.org/devdocs/release/1.19.0-notes.html#deprecation-of-probably-unused-c-api-functions

Hello, I encountered the same problem as you. Did you solve the problem by dropping the numpy version below 1.19? I dropped to 1.18 and then prompted:ImportError: numpy.core.multiarray failed to import

Synia-L avatar Dec 09 '21 09:12 Synia-L

I addressed this in a fork - https://github.com/dnbaker/ffht.

I switched to pybind11 to remove the deprecated api usage and added 2d support.

dnbaker avatar Dec 09 '21 16:12 dnbaker