Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/xtensor-python/pytensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ namespace xt
*/
template <class T, std::size_t N, layout_type L>
inline pytensor<T, N, L>::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());
Expand Down Expand Up @@ -416,7 +416,7 @@ namespace xt
auto dtype = pybind11::detail::npy_format_descriptor<T>::dtype();

auto tmp = pybind11::reinterpret_steal<pybind11::object>(
PyArray_NewFromDescr(&PyArray_Type, (PyArray_Descr*) dtype.ptr(), static_cast<int>(shape.size()),
PyArray_NewFromDescr(&PyArray_Type, (PyArray_Descr*) dtype.release().ptr(), static_cast<int>(shape.size()),
const_cast<npy_intp*>(shape.data()), python_strides,
nullptr, flags, nullptr));

Expand Down