diff --git a/include/xtensor-python/pytensor.hpp b/include/xtensor-python/pytensor.hpp index 0b73012..1d38307 100644 --- a/include/xtensor-python/pytensor.hpp +++ b/include/xtensor-python/pytensor.hpp @@ -342,7 +342,7 @@ namespace xt */ template inline pytensor::pytensor(const self_type& rhs) - : self_type() + : base_type(), semantic_base(rhs) { init_tensor(rhs.shape(), rhs.strides()); std::copy(rhs.storage().cbegin(), rhs.storage().cend(), this->storage().begin()); @@ -416,7 +416,7 @@ namespace xt auto dtype = pybind11::detail::npy_format_descriptor::dtype(); auto tmp = pybind11::reinterpret_steal( - PyArray_NewFromDescr(&PyArray_Type, (PyArray_Descr*) dtype.ptr(), static_cast(shape.size()), + PyArray_NewFromDescr(&PyArray_Type, (PyArray_Descr*) dtype.release().ptr(), static_cast(shape.size()), const_cast(shape.data()), python_strides, nullptr, flags, nullptr));