I have created a function which takes a py::array_t<double> as input.
When calling it from Python, I can pass as input a NumPy array with either float32 or float64 dtype. My issue with this is that if the former dtype is used, it will inevitably incur a "silent" copy of the array in order to coerce it to float64.
I would like to disable all such silent copies (e.g., produce an error if a float32 array is passed).
For the same reason, I would also like to disallow inputs that are not C-contiguous since my function assumes C-contiguity.
Are any of these things possible to do (easily) with PyBind11?