Closed wolfv closed 6 years ago
The way it's implemented now, it falls back to the typenum check for arithmetic types, and checks dtypes for more complicated types (like arrays, or structs).
We reuse Pybind11s mechanism to bind struct arrays but that's experimental for now.
This adds support for char arrays:
It also adds some initial dtype support (i.e. you can declare structs, use them inside C++ and serialize them from numpy). However, pybind has a lot of code that deals with padding differences from C++ / NumPy which I haven't really looked at.
This code also removes our own typenum stuff as well as switching to use
PyArray_EquivTypes
instead of comparing the typenums. There is a good chance that comparing typenums is faster. Therefore, we could statically enable typenums if we know (from the C++ type) that a statically determinable typenum is available.@iamthebot you might be interested in this based off of your question in #142