Skip to content

Commit b5390ab

Browse files
committed
call cython numpy import_array() in a few places
1 parent 54019f7 commit b5390ab

File tree

4 files changed

+1372
-1367
lines changed

4 files changed

+1372
-1367
lines changed

talib/_abstract.pxi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ cimport numpy as np
1515
cimport _ta_lib as lib
1616
# NOTE: _ta_check_success, MA_Type is defined in _common.pxi
1717

18+
np.import_array() # Initialize the NumPy C API
1819

1920
# lookup for TALIB input parameters which don't define expected price series inputs
2021
__INPUT_PRICE_SERIES_DEFAULTS = {'price': 'close',

talib/_stream.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ from cython import boundscheck, wraparound
33
cimport _ta_lib as lib
44
from _ta_lib cimport TA_RetCode
55
# NOTE: _ta_check_success, NaN are defined in common.pxi
6-
# NumPy C API is initialize in _func.pxi
76

7+
np.import_array() # Initialize the NumPy C API
88

99
@wraparound(False) # turn off relative indexing from end of lists
1010
@boundscheck(False) # turn off bounds-checking for entire function

0 commit comments

Comments
 (0)