Python buffer objects can have negative strides.

This commit is contained in:
Cris Luengo
2017-04-05 16:13:04 -06:00
committed by Dean Moldovan
parent 2b941b38b4
commit d400f60c96
6 changed files with 40 additions and 33 deletions

View File

@@ -13,6 +13,7 @@
#include <pybind11/stl.h>
#include <cstdint>
#include <vector>
using arr = py::array;
using arr_t = py::array_t<uint16_t, 0>;
@@ -294,4 +295,4 @@ test_initializer numpy_array([](py::module &m) {
std::fill(a.mutable_data(), a.mutable_data() + a.size(), 42.);
return a;
});
});
});