File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
#include <Python.h>
2
2
3
3
#define PY_ARRAY_UNIQUE_SYMBOL quaddtype_ARRAY_API
4
+ #define PY_UFUNC_UNIQUE_SYMBOL quaddtype_UFUNC_API
4
5
#define NPY_NO_DEPRECATED_API NPY_2_0_API_VERSION
5
6
#define NPY_TARGET_VERSION NPY_2_0_API_VERSION
6
7
#define NO_IMPORT_ARRAY
8
+ #define NO_IMPORT_UFUNC
7
9
#include "numpy/ndarraytypes.h"
8
10
#include "numpy/arrayobject.h"
9
11
#include "numpy/dtype_api.h"
Original file line number Diff line number Diff line change 1
1
#include <Python.h>
2
2
3
3
#define PY_ARRAY_UNIQUE_SYMBOL quaddtype_ARRAY_API
4
+ #define PY_UFUNC_UNIQUE_SYMBOL quaddtype_UFUNC_API
4
5
#define NPY_NO_DEPRECATED_API NPY_2_0_API_VERSION
5
6
#define NPY_TARGET_VERSION NPY_2_0_API_VERSION
6
7
#define NO_IMPORT_ARRAY
8
+ #define NO_IMPORT_UFUNC
7
9
#include "numpy/ndarraytypes.h"
8
10
#include "numpy/arrayobject.h"
9
11
#include "numpy/dtype_api.h"
Original file line number Diff line number Diff line change 1
1
#include <Python.h>
2
2
3
3
#define PY_ARRAY_UNIQUE_SYMBOL quaddtype_ARRAY_API
4
+ #define PY_UFUNC_UNIQUE_SYMBOL quaddtype_UFUNC_API
4
5
#define NPY_NO_DEPRECATED_API NPY_2_0_API_VERSION
5
6
#include "numpy/arrayobject.h"
7
+ #include "numpy/ufuncobject.h"
6
8
#include "numpy/dtype_api.h"
7
9
8
10
#include "dtype.h"
@@ -19,8 +21,8 @@ static struct PyModuleDef moduledef = {
19
21
PyMODINIT_FUNC
20
22
PyInit__quaddtype_main (void )
21
23
{
22
- if ( import_array () < 0 )
23
- return NULL ;
24
+ import_array ();
25
+ import_umath () ;
24
26
25
27
PyObject * m = PyModule_Create (& moduledef );
26
28
if (m == NULL ) {
Original file line number Diff line number Diff line change 1
1
#include <Python.h>
2
2
3
3
#define PY_ARRAY_UNIQUE_SYMBOL quaddtype_ARRAY_API
4
+ #define PY_UFUNC_UNIQUE_SYMBOL quaddtype_UFUNC_API
4
5
#define NPY_NO_DEPRECATED_API NPY_2_0_API_VERSION
5
6
#define NPY_TARGET_VERSION NPY_2_0_API_VERSION
6
7
#define NO_IMPORT_ARRAY
8
+ #define NO_IMPORT_UFUNC
7
9
#include "numpy/ndarraytypes.h"
8
10
#include "numpy/arrayobject.h"
9
11
#include "numpy/ufuncobject.h"
You can’t perform that action at this time.
0 commit comments