Skip to content

Commit

Permalink
Merge pull request #2370 from jcarpent/topic/casadi
Browse files Browse the repository at this point in the history
Fix compatibility with NumPy 2.x
  • Loading branch information
jcarpent authored Aug 13, 2024
2 parents bea001a + bf785aa commit a87f51f
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 a87f51f

Please sign in to comment.