Skip to content

Commit

Permalink
CLN: More numpy 2 stuff (#57668)
Browse files Browse the repository at this point in the history
* CLN: More numpy 2 stuff

* More

* fix warning

* clean

---------

Co-authored-by: William Ayd <will_ayd@innobi.io>
  • Loading branch information
lithomas1 and WillAyd committed Mar 2, 2024
1 parent 8fde168 commit 1bf86a3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pandas/_libs/src/vendored/ujson/python/objToJSON.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ typedef struct __NpyArrContext {
npy_intp ndim;
npy_intp index[NPY_MAXDIMS];
int type_num;
PyArray_GetItemFunc *getitem;

char **rowLabels;
char **columnLabels;
Expand Down Expand Up @@ -405,7 +404,6 @@ static void NpyArr_iterBegin(JSOBJ _obj, JSONTypeContext *tc) {
}

npyarr->array = (PyObject *)obj;
npyarr->getitem = (PyArray_GetItemFunc *)PyArray_DESCR(obj)->f->getitem;
npyarr->dataptr = PyArray_DATA(obj);
npyarr->ndim = PyArray_NDIM(obj) - 1;
npyarr->curdim = 0;
Expand Down Expand Up @@ -492,7 +490,7 @@ static int NpyArr_iterNextItem(JSOBJ obj, JSONTypeContext *tc) {
((PyObjectEncoder *)tc->encoder)->npyValue = npyarr->dataptr;
((PyObjectEncoder *)tc->encoder)->npyCtxtPassthru = npyarr;
} else {
GET_TC(tc)->itemValue = npyarr->getitem(npyarr->dataptr, npyarr->array);
GET_TC(tc)->itemValue = PyArray_GETITEM(arrayobj, npyarr->dataptr);
}

npyarr->dataptr += npyarr->stride;
Expand Down

0 comments on commit 1bf86a3

Please sign in to comment.