1
1
#include <Python.h>
2
2
3
+ #include <Python.h>
4
+
3
5
#define PY_ARRAY_UNIQUE_SYMBOL unytdtype_ARRAY_API
4
- #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
6
+ #define NPY_NO_DEPRECATED_API NPY_2_0_API_VERSION
7
+ #define NPY_TARGET_VERSION NPY_2_0_API_VERSION
5
8
#define NO_IMPORT_ARRAY
6
9
#include "numpy/arrayobject.h"
7
- #include "numpy/experimental_dtype_api .h"
10
+ #include "numpy/dtype_api .h"
8
11
#include "numpy/ndarraytypes.h"
9
12
10
13
#include "casts.h"
@@ -442,7 +445,7 @@ static PyArray_DTypeMeta *u2u_dtypes[2] = {NULL, NULL};
442
445
443
446
static PyType_Slot u2u_slots [] = {
444
447
{NPY_METH_resolve_descriptors , & unit_to_unit_resolve_descriptors },
445
- {_NPY_METH_get_loop , & unit_to_unit_get_loop },
448
+ {NPY_METH_get_loop , & unit_to_unit_get_loop },
446
449
{0 , NULL }};
447
450
448
451
static PyArrayMethod_Spec UnitToUnitCastSpec = {
@@ -456,7 +459,7 @@ static PyArrayMethod_Spec UnitToUnitCastSpec = {
456
459
};
457
460
458
461
static PyType_Slot u2f_slots [] = {
459
- {_NPY_METH_get_loop , & unit_to_float64_get_loop }, {0 , NULL }};
462
+ {NPY_METH_get_loop , & unit_to_float64_get_loop }, {0 , NULL }};
460
463
461
464
static char * u2f_name = "cast_UnytDType_to_Float64" ;
462
465
0 commit comments