We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b6860b commit dd4d875Copy full SHA for dd4d875
include/xtensor-python/pycontainer.hpp
@@ -329,8 +329,7 @@ namespace xt
329
throw std::runtime_error("Cannot reshape with unknown layout_type.");
330
}
331
332
- std::vector<npy_intp> int_shape(shape.begin(), shape.end());
333
- PyArray_Dims dims({int_shape.data(), static_cast<int>(shape.size())});
+ PyArray_Dims dims({reinterpret_cast<npy_intp*>(shape.data()), static_cast<int>(shape.size())});
334
PyArray_Newshape((PyArrayObject*) this->ptr(), &dims, npy_layout);
335
336
0 commit comments