File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ PyArray_ImportNumPyAPI(void)
125
125
#define NPY_DEFAULT_INT \
126
126
(PyArray_RUNTIME_VERSION >= NPY_2_0_API_VERSION ? NPY_INTP : NPY_LONG)
127
127
#define NPY_RAVEL_AXIS \
128
- (PyArray_RUNTIME_VERSION >= NPY_2_0_API_VERSION ? -1 : 32)
128
+ (PyArray_RUNTIME_VERSION >= NPY_2_0_API_VERSION ? NPY_MIN_INT : 32)
129
129
#define NPY_MAXARGS \
130
130
(PyArray_RUNTIME_VERSION >= NPY_2_0_API_VERSION ? 64 : 32)
131
131
#endif
Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ def get_default_integer():
129
129
return cnp.dtype(" intp" )
130
130
return None
131
131
132
+ def get_ravel_axis ():
133
+ return cnp.NPY_RAVEL_AXIS
134
+
135
+
132
136
def conv_intp (cnp.intp_t val ):
133
137
return val
134
138
Original file line number Diff line number Diff line change @@ -153,6 +153,13 @@ def test_default_int(install_temp):
153
153
154
154
assert checks .get_default_integer () is np .dtype (int )
155
155
156
+
157
+ def test_ravel_axis (install_temp ):
158
+ import checks
159
+
160
+ assert checks .get_ravel_axis () == np .iinfo ("intc" ).min
161
+
162
+
156
163
def test_convert_datetime64_to_datetimestruct (install_temp ):
157
164
# GH#21199
158
165
import checks
You can’t perform that action at this time.
0 commit comments