Vladimír Vondruš
fc716799b8
python: clarify a test comment.
...
I completely forgot out-of-bounds slices were silently accepted.
3 years ago
Vladimír Vondruš
4fe21deaaf
python: document and test error cases in "fancy" strided view APIs.
...
Changed those to be IndexError instead of ValueError, since those are
indexing dimensions. Plus added a new check for broadcasted dimension
size as otherwise it'd blow up on a C++ assert.
3 years ago
Vladimír Vondruš
69f859a579
python: no need to prefix a test class with Test.
...
Only the functions need to be prefixed.
3 years ago
Vladimír Vondruš
27983b66ba
python: add a dedicated test for StridedArrayView of a dynamic type.
...
Yup, this could work very well for MeshData / SceneData generic
attribute and field access with what's already there, no changes needed.
3 years ago
Vladimír Vondruš
2295f43873
Updated copyright year.
4 years ago
Vladimír Vondruš
8e00226da3
python: add a caster for Containers::Optional.
5 years ago
Vladimír Vondruš
98a3dcf59c
python: basic support for arbitrary types in strided array views.
...
Not ArrayView yet, and also no documentation on this whatsoever. That'll
come next. Also not everything works with arbitrary types yet,
converting from buffer protocol doesn't remember the format and
conversion to bytes doesn't take the actual type size into account
either.
5 years ago
Vladimír Vondruš
84f9bb2a9d
Updated copyright year.
5 years ago
Vladimír Vondruš
b1d45fc85a
Updated copyright year.
6 years ago
Vladimír Vondruš
2eebb45557
python: don't keep a reference to owner for empty array views.
...
We don't need to reference anything from it anyway.
7 years ago
Vladimír Vondruš
f3c0454c72
python: ensure memory owners are compared with `is`.
...
Otherwise it gives false positives (as was the case with one
comparison).
7 years ago
Vladimír Vondruš
c40627c96c
python: better name [Strided]ArrayView memory owner property.
...
Mirroring Python's obj is not good, as the name is absolutely not
describing what it is.
7 years ago
Vladimír Vondruš
4cbda8081b
corrade/containers: finally give up on testing ArrayView dimensions.
...
Numpy's array sometimes has 0 dimensions even though everything else is
okay.
7 years ago
Vladimír Vondruš
a18c438352
python: so we need MutableStridedArrayView4D as well.
...
In order to access pixel data in 3D images, of course.
7 years ago
Vladimír Vondruš
f9a2146142
python/corrade: remove TODOs that are impossible.
7 years ago
Vladimír Vondruš
ce3d2564fd
python/corrade: make our own buffer protocol for array views.
...
THe one from pybind11 is severely limited and allocation-happy. Lots of
tech debt and TODOs resolved now, yay.
7 years ago
Vladimír Vondruš
2ae83a0c26
python: make ArrayView properly convertible from Python array.
...
Also fix element sizes that aren't 1.
7 years ago
Vladimír Vondruš
d34366ac46
python: expose ArrayView and StridedArrayView.
...
Wow. This took a while and still is far from ideal.
7 years ago