Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lixy
ceph-ceph-16.2.15
0026-432-boostorg-python-numpy2.0.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0026-432-boostorg-python-numpy2.0.patch of Package ceph-ceph-16.2.15
diff --git a/src/boost/libs/python/src/numpy/dtype.cpp b/src/boost/libs/python/src/numpy/dtype.cpp index 88a20a2..da30d19 100644 --- a/src/boost/libs/python/src/numpy/dtype.cpp +++ b/src/boost/libs/python/src/numpy/dtype.cpp @@ -98,7 +98,13 @@ python::detail::new_reference dtype::convert(object const & arg, bool align) return python::detail::new_reference(reinterpret_cast<PyObject*>(obj)); } -int dtype::get_itemsize() const { return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;} +int dtype::get_itemsize() const { +#if NPY_ABI_VERSION < 0x02000000 + return reinterpret_cast<PyArray_Descr*>(ptr())->elsize; +#else + return PyDataType_ELSIZE(reinterpret_cast<PyArray_Descr*>(ptr())); +#endif +} bool equivalent(dtype const & a, dtype const & b) { // On Windows x64, the behaviour described on
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