11#include <Python.h>
22
3+ #include <Python.h>
4+
35#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
58#define NO_IMPORT_ARRAY
69#include "numpy/arrayobject.h"
7- #include "numpy/experimental_dtype_api .h"
10+ #include "numpy/dtype_api .h"
811#include "numpy/ndarraytypes.h"
912
1013#include "casts.h"
@@ -442,7 +445,7 @@ static PyArray_DTypeMeta *u2u_dtypes[2] = {NULL, NULL};
442445
443446static PyType_Slot u2u_slots [] = {
444447 {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 },
446449 {0 , NULL }};
447450
448451static PyArrayMethod_Spec UnitToUnitCastSpec = {
@@ -456,7 +459,7 @@ static PyArrayMethod_Spec UnitToUnitCastSpec = {
456459};
457460
458461static 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 }};
460463
461464static char * u2f_name = "cast_UnytDType_to_Float64" ;
462465
0 commit comments