From ba5598af052f960c786d2ae0e525ad6084aeadd8 Mon Sep 17 00:00:00 2001 From: "Victor J. Forouhar Moreno" <60343271+VictorForouhar@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:04:52 +0200 Subject: [PATCH] Changed PyArray dtypes to NPY (#37) --- sphviewer/extensions/scenemodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphviewer/extensions/scenemodule.c b/sphviewer/extensions/scenemodule.c index da25de5..06baa98 100644 --- a/sphviewer/extensions/scenemodule.c +++ b/sphviewer/extensions/scenemodule.c @@ -76,7 +76,7 @@ float *get_float_array(PyArrayObject *array_obj, int n){ /* This function returns the data stored in a float PyArrayObject*/ /*We enfore C contiguous arrays*/ - PyArrayObject *cont_obj = PyArray_ContiguousFromObject(array_obj, PyArray_FLOAT, 1, 3); + PyArrayObject *cont_obj = PyArray_ContiguousFromObject(array_obj, NPY_FLOAT, 1, 3); float *local_array = (float *)cont_obj->data; float *output = (float *)malloc( n * sizeof(float) ); @@ -95,7 +95,7 @@ float *get_double_array(PyArrayObject *array_obj, int n){ /* This function returns the data stored in a double PyArrayObject*/ /*We enfore C contiguous arrays*/ - PyArrayObject *cont_obj = PyArray_ContiguousFromObject(array_obj, PyArray_DOUBLE, 1, 3); + PyArrayObject *cont_obj = PyArray_ContiguousFromObject(array_obj, NPY_DOUBLE, 1, 3); double *local_array = (double *)cont_obj->data; float *output = (float *)malloc( n * sizeof(float) );