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

@@ -203,6 +203,10 @@ def test_wrap():
a2 = wrap(a1d)
assert_references(a1d, a2, a1)
a1m = a1[::-1, ::-1, ::-1]
a2 = wrap(a1m)
assert_references(a1m, a2, a1)
def test_numpy_view(capture):
from pybind11_tests.array import ArrayClass