From 8286759a7b1464c07fa7b8d1b1d103ebcfd75f9e Mon Sep 17 00:00:00 2001 From: Mike Boyle Date: Sat, 17 Aug 2024 16:57:09 -0400 Subject: [PATCH] Update npy_2_compat as in numpy source --- src/npy_2_compat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/npy_2_compat.h b/src/npy_2_compat.h index 50e637f..e39e65a 100644 --- a/src/npy_2_compat.h +++ b/src/npy_2_compat.h @@ -53,7 +53,7 @@ #if NPY_ABI_VERSION < 0x02000000 /* * Define 2.0 feature version as it is needed below to decide whether we - * compile for both 1.x and 2.x (defining it gaurantees 1.x only). + * compile for both 1.x and 2.x (defining it guarantees 1.x only). */ #define NPY_2_0_API_VERSION 0x00000012 /* @@ -74,7 +74,7 @@ #ifdef import_array1 static inline int -PyArray_ImportNumPyAPI() +PyArray_ImportNumPyAPI(void) { if (NPY_UNLIKELY(PyArray_API == NULL)) { import_array1(-1); @@ -125,7 +125,7 @@ PyArray_ImportNumPyAPI() #define NPY_DEFAULT_INT \ (PyArray_RUNTIME_VERSION >= NPY_2_0_API_VERSION ? NPY_INTP : NPY_LONG) #define NPY_RAVEL_AXIS \ - (PyArray_RUNTIME_VERSION >= NPY_2_0_API_VERSION ? -1 : 32) + (PyArray_RUNTIME_VERSION >= NPY_2_0_API_VERSION ? NPY_MIN_INT : 32) #define NPY_MAXARGS \ (PyArray_RUNTIME_VERSION >= NPY_2_0_API_VERSION ? 64 : 32) #endif