Skip to content

Commit

Permalink
Changed PyArray dtypes to NPY (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorForouhar authored Jul 16, 2024
1 parent 56fedd7 commit ba5598a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphviewer/extensions/scenemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) );
Expand All @@ -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) );
Expand Down

0 comments on commit ba5598a

Please sign in to comment.