Skip to content

Commit dd4d875

Browse files
committed
remove copy
1 parent 7b6860b commit dd4d875

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/xtensor-python/pycontainer.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,7 @@ namespace xt
329329
throw std::runtime_error("Cannot reshape with unknown layout_type.");
330330
}
331331

332-
std::vector<npy_intp> int_shape(shape.begin(), shape.end());
333-
PyArray_Dims dims({int_shape.data(), static_cast<int>(shape.size())});
332+
PyArray_Dims dims({reinterpret_cast<npy_intp*>(shape.data()), static_cast<int>(shape.size())});
334333
PyArray_Newshape((PyArrayObject*) this->ptr(), &dims, npy_layout);
335334
}
336335

0 commit comments

Comments
 (0)