diff options
Diffstat (limited to 'tests/run/numpy_cimport_6.pyx')
-rw-r--r-- | tests/run/numpy_cimport_6.pyx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/run/numpy_cimport_6.pyx b/tests/run/numpy_cimport_6.pyx new file mode 100644 index 000000000..5cda5246d --- /dev/null +++ b/tests/run/numpy_cimport_6.pyx @@ -0,0 +1,25 @@ +# mode: run +# tag: warnings, numpy + +from numpy cimport ndarray, import_array +import_array() +# np.import_array is called - no warning necessary + +cdef extern from *: + """ + static void** _check_array_api(void) { + return PyArray_API; /* should be non NULL */ + } + """ + void** _check_array_api() + +def check_array_api(): + """ + >>> check_array_api() + True + """ + return _check_array_api() != NULL + + +_WARNINGS = """ +""" |