8000 MAINT: Cython restore NPY_MAXDIMS and add NPY_RAVEL_AXIS · numpy/numpy@afc421d · GitHub
[go: up one dir, main page]

Skip to content

Commit afc421d

Browse files
committed
MAINT: Cython restore NPY_MAXDIMS and add NPY_RAVEL_AXIS
1 parent 8111907 commit afc421d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

numpy/__init__.cython-30.pxd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ cdef extern from "numpy/arrayobject.h":
186186

187187
NPY_ARRAY_UPDATE_ALL
188188

189+
cdef enum:
190+
NPY_MAXDIMS # 64 on NumPy 2.x and 32 on NumPy 1.x
191+
NPY_RAVEL_AXIS # Used for functions like PyArray_Mean
192+
189193
ctypedef void (*PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *)
190194

191195
ctypedef struct PyArray_ArrayDescr:

numpy/__init__.pxd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ cdef extern from "numpy/arrayobject.h":
181181

182182
NPY_ARRAY_UPDATE_ALL
183183

184+
cdef enum:
185+
NPY_MAXDIMS # 64 on NumPy 2.x and 32 on NumPy 1.x
186+
NPY_RAVEL_AXIS # Used for functions like PyArray_Mean
187+
184188
ctypedef void (*PyArray_VectorUnaryFunc)(void *, void *, npy_intp, void *, void *)
185189

186190
ctypedef struct PyArray_ArrayDescr:

0 commit comments

Comments
 (0)
0