Skip to content

Commit d228b02

Browse files
committed
Using NPY_ARRAY_DEFAULT
1 parent 5b04ca4 commit d228b02

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

talib/_func.pxi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

talib/_ta_lib.c

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/generate_func.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
raise Exception("input array type is not double")
9090
if real.ndim != 1:
9191
raise Exception("input array has wrong dimensions")
92-
if not (PyArray_FLAGS(real) & np.NPY_C_CONTIGUOUS):
92+
if not (PyArray_FLAGS(real) & np.NPY_ARRAY_C_CONTIGUOUS):
9393
real = PyArray_GETCONTIGUOUS(real)
9494
return real
9595
@@ -189,7 +189,7 @@
189189
cdef:
190190
np.ndarray outreal
191191
double* outreal_data
192-
outreal = PyArray_EMPTY(1, &length, np.NPY_DOUBLE, np.NPY_DEFAULT)
192+
outreal = PyArray_EMPTY(1, &length, np.NPY_DOUBLE, np.NPY_ARRAY_DEFAULT)
193193
outreal_data = <double*>outreal.data
194194
for i from 0 <= i < min(lookback, length):
195195
outreal_data[i] = NaN
@@ -199,7 +199,7 @@
199199
cdef:
200200
np.ndarray outinteger
201201
int* outinteger_data
202-
outinteger = PyArray_EMPTY(1, &length, np.NPY_INT32, np.NPY_DEFAULT)
202+
outinteger = PyArray_EMPTY(1, &length, np.NPY_INT32, np.NPY_ARRAY_DEFAULT)
203203
outinteger_data = <int*>outinteger.data
204204
for i from 0 <= i < min(lookback, length):
205205
outinteger_data[i] = 0

0 commit comments

Comments
 (0)