diff --git a/imperative/python/src/helper.h b/imperative/python/src/helper.h index 82cd083f..ec0942c1 100644 --- a/imperative/python/src/helper.h +++ b/imperative/python/src/helper.h @@ -279,7 +279,7 @@ namespace detail { PYBIND11_TYPE_CASTER(mgb::TensorShape, _("TensorShape")); public: bool load(handle src, bool convert) { - auto obj = reinterpret_steal(src); + auto obj = reinterpret_borrow(src); if (!convert && !isinstance(obj)) { return false; }