Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign updtype gets implicitly converted, and buffer is copied #129
Comments
|
Actually in pybind11 there is a compile-time option like so: void f(py::array_t<double, py::array::c_style | py::array::forcecast> array);To signify if that array should be casted or not. Maybe we could use that, or something similar? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When we have a function taking a pyarray but pass in a numpy array of integers, the numpy array is implicitly converted to a pyarray of doubles (but this creates a copy of the buffer).
We should think about emitting a warning in this case, or make the warning user modifiable.
Or at least clearly document it.