Skip to content

Commit

Permalink
Bugfix th the idyntree_vector_casters load functions
Browse files Browse the repository at this point in the history
  • Loading branch information
GiulioRomualdi committed Nov 25, 2021
1 parent 7037767 commit 97236d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bindings/pybind11/idyntree_vector_casters.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ struct type_caster<Type,
{
namespace py = ::pybind11;

if (!convert && array_t<double>::check_(src))
// If we're in no-convert mode, only load if given an array of the correct type
if (!convert && !py::isinstance<array_t<double>>(src))
{
return false;
}
Expand Down Expand Up @@ -223,7 +224,8 @@ struct type_caster<Type,
{
namespace py = ::pybind11;

if (!convert && array_t<double>::check_(src))
// If we're in no-convert mode, only load if given an array of the correct type
if (!convert && !py::isinstance<array_t<double>>(src))
{
return false;
}
Expand Down

0 comments on commit 97236d6

Please sign in to comment.