Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:python:numeric
python-numexpr
revert-to-numpy1.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File revert-to-numpy1.patch of Package python-numexpr
From beedecb3990d604d0f272c1a2f9a1d117f6120ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= <cr52@protonmail.com> Date: Mon, 1 Apr 2024 14:43:52 +0200 Subject: Revert: [PATCH] BLD: fix compiling against numpy 2.0 --- numexpr/interpreter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: numexpr-2.10.0/numexpr/interpreter.cpp =================================================================== --- numexpr-2.10.0.orig/numexpr/interpreter.cpp +++ numexpr-2.10.0/numexpr/interpreter.cpp @@ -1203,7 +1203,7 @@ NumExpr_run(NumExprObject *self, PyObjec Py_INCREF(dtypes[0]); } else { // constant, like in '"foo"' dtypes[0] = PyArray_DescrNewFromType(NPY_STRING); - PyDataType_SET_ELSIZE(dtypes[0], (npy_intp)self->memsizes[1]); + dtypes[0]->elsize = (int)self->memsizes[1]; } // no string temporaries, so no third case } if (dtypes[0] == NULL) { @@ -1449,7 +1449,7 @@ NumExpr_run(NumExprObject *self, PyObjec /* Get the sizes of all the operands */ dtypes_tmp = NpyIter_GetDescrArray(iter); for (i = 0; i < n_inputs+1; ++i) { - self->memsizes[i] = PyDataType_ELSIZE(dtypes_tmp[i]); + self->memsizes[i] = dtypes_tmp[i]->elsize; } /* For small calculations, just use 1 thread */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor