Skip to content

Commit

Permalink
python/casadi: fix compatibility with NumPy 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarpent committed Aug 13, 2024
1 parent bea001a commit be0ac37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/pinocchio/bindings/python/context/casadi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,9 @@ namespace eigenpy
else
{
Scalar tmp_value;
PyArray_DESCR(py_array)->f->copyswap(
&tmp_value, ip, PyArray_ISBYTESWAPPED(py_array), array);
PyArray_Descr * descr = PyArray_DESCR(py_array);
PyArray_ArrFuncs * f = *PyDataType_GetArrFuncs(descr);
f->copyswap(&tmp_value, ip, PyArray_ISBYTESWAPPED(py_array), array);
return (npy_bool)(tmp_value.is_zero());
}
}
Expand Down

0 comments on commit be0ac37

Please sign in to comment.