-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Closed
Labels
Description
Describe the issue:
Doc page https://numpy.org/doc/stable/reference/c-api/array.html for 2.0 stable states that PyArray_MultiIter_SIZE
is new in 1.26.0.
It is defined with NumPy 2.0.
Lack of this function makes it difficult to update mkl_random
to NumPy 2.0
Reproduce the code example:
(b_mkl_packages) opavlyk@opavlyk-mobl:~/repos/mkl_random$ conda list numpy
# packages in environment at /home/opavlyk/mamba3/envs/b_mkl_packages:
#
# Name Version Build Channel
numpy 1.26.4 pypi_0 pypi
(b_mkl_packages) opavlyk@opavlyk-mobl:~/repos/mkl_random$ grep -r PyArray_MultiIter_SIZE $CONDA_PREFIX/lib/python3.12/site-packages/numpy
(b_mkl_packages) opavlyk@opavlyk-mobl:~/repos/mkl_random$
### Error message:
```shell
Building native extension in `mkl_random` fails with the like of
mkl_random/mklrand.cpp:10517:26: error: ‘PyArray_MultiIter_SIZE’ was not declared in this scope; did you mean ‘PyArray_MultiIter_GOTO’?
10517 | __pyx_t_10 = PyArray_MultiIter_SIZE(__pyx_v_multi);
| ^~~~~~~~~~~~~~~~~~~~~~
| PyArray_MultiIter_GOTO
mkl_random/mklrand.cpp:10732:18: error: ‘PyArray_MultiIter_SIZE’ was not declared in this scope; did you mean ‘PyArray_MultiIter_GOTO’?
10732 | __pyx_t_1 = (PyArray_MultiIter_SIZE(__pyx_v_multi) != __pyx_v_res_size);
| ^~~~~~~~~~~~~~~~~~~~~~
| PyArray_MultiIter_GOTO
mkl_random/mklrand.cpp:10970:24: error: ‘PyArray_MultiIter_NDIM’ was not declared in this scope; did you mean ‘PyArray_MultiIter_NEXT’?
10970 | __pyx_v_multi_nd = PyArray_MultiIter_NDIM(__pyx_v_multi);
| ^~~~~~~~~~~~~~~~~~~~~~
| PyArray_MultiIter_NEXT
mkl_random/mklrand.cpp:10979:26: error: ‘PyArray_MultiIter_DIMS’ was not declared in this scope; did you mean ‘PyArray_MultiIter_DATA’?
10979 | __pyx_v_multi_dims = PyArray_MultiIter_DIMS(__pyx_v_multi);
| ^~~~~~~~~~~~~~~~~~~~~~
| PyArray_MultiIter_DATA
### Python and NumPy Versions:
Python 3.12, NumPy 1.26.4
### Runtime Environment:
_No response_
### Context for the issue:
_No response_