@@ -22,7 +22,7 @@ cdef np.ndarray check_array(np.ndarray real):
2222 raise Exception (" input array type is not double" )
2323 if real.ndim != 1 :
2424 raise Exception (" input array has wrong dimensions" )
25- if not (PyArray_FLAGS(real) & np.NPY_C_CONTIGUOUS ):
25+ if not (PyArray_FLAGS(real) & np.NPY_ARRAY_C_CONTIGUOUS ):
2626 real = PyArray_GETCONTIGUOUS(real)
2727 return real
2828
@@ -122,7 +122,7 @@ cdef np.ndarray make_double_array(np.npy_intp length, int lookback):
122122 cdef:
123123 np.ndarray outreal
124124 double * outreal_data
125- outreal = PyArray_EMPTY(1 , & length, np.NPY_DOUBLE, np.NPY_DEFAULT )
125+ outreal = PyArray_EMPTY(1 , & length, np.NPY_DOUBLE, np.NPY_ARRAY_DEFAULT )
126126 outreal_data = < double * > outreal.data
127127 for i from 0 <= i < min (lookback, length):
128128 outreal_data[i] = NaN
@@ -132,7 +132,7 @@ cdef np.ndarray make_int_array(np.npy_intp length, int lookback):
132132 cdef:
133133 np.ndarray outinteger
134134 int * outinteger_data
135- outinteger = PyArray_EMPTY(1 , & length, np.NPY_INT32, np.NPY_DEFAULT )
135+ outinteger = PyArray_EMPTY(1 , & length, np.NPY_INT32, np.NPY_ARRAY_DEFAULT )
136136 outinteger_data = < int * > outinteger.data
137137 for i from 0 <= i < min (lookback, length):
138138 outinteger_data[i] = 0
0 commit comments