Vladimír Vondruš
6d8ab441e8
python: expose the new expanded() API on strided (bit) array views.
...
Not collapsed() yet, as it has the return type depending on the count
parameter, and I'm not yet decided how to express that here.
3 years ago
Vladimír Vondruš
b5557a94cd
package/archlinux: use Ninja Multi-Config for the dev PKGBUILD.
...
So I have at least some semi-convenient way to switch to a debug build
in order to debug a strange crash or assertion.
3 years ago
Vladimír Vondruš
94d26a25e5
python: expose all [Mutable][Strided]BitArray[View] APIs.
3 years ago
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š
8b30876304
python: expose Corrade's utility.copy().
...
Because having to pull in the whole numpy just to efficiently copy some
data around is *silly*.
3 years ago
Vladimír Vondruš
d508fd9c04
python: ability to set ConfigurationGroup values in all primitive types.
...
Not custom types like Magnum vectors yet, but at least the basics now.
3 years ago
Vladimír Vondruš
45a48f6c0b
python: add a dummy test file for the PluginManager library.
...
It only explains where the stuff is actually tested, as it's not
possible to do that from here.
3 years ago
Vladimír Vondruš
12dbfc56c8
python: expose essentials of utility.ConfigurationGroup.
...
Need that for configuring plugins -- originally thought I'd wait until
the class is reworked, but that isn't coming anytime soon given there's
insane pressure on other things, so I have to figure out a plan B.
The interface is the most barebones possible, exposing nothing that I'd
later plan to rename or remove. Just the least possible amount of APIs
to make it possible to configure plugins, and no custom type support yet
either -- if you need to write a vector, write it as a formatted string
instead, sorry.
To make it possible to test the APIs in isolation instead of through
the plugin interface, I added also a Configuration class. Also just the
least amount possible to cover the code with tests.
3 years ago
Vladimír Vondruš
173a01f1b6
python: rename Python struct format helper to avoid clashes.
3 years ago
Vladimír Vondruš
ae5741e4d0
python: fix to build with pybind11 2.3.
...
I should probably reconsider supporting such old versions, but no time
for that now.
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š
d2f5ea43d5
CMake: use the CMAKE_FOLDER variable instead of FOLDER property.
...
It limits the support for CMake 3.12+, but it's much less verbose and I
don't expect people to use ancient CMake versions with IDEs like Xcode
or VS anyway, so this should be fine.
4 years ago
Vladimír Vondruš
2295f43873
Updated copyright year.
4 years ago
Vladimír Vondruš
0bf27c07f2
python: I don't understand this comment. Remove.
5 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š
86d64a6a5a
package/archlinux: coverage PKGBUILD.
...
Generating both C++ and Python coverage.
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