refactor bindings to avoid copies of 1D arrays in evalp
Since, by definition, `xt::pytensor` cannot be reshaped, and since `py::array` cannot be manipulated in an intermediate step on the C++ side without compromising on it being accepted as an `xt::xexpression` type afterwards, the only viable option seemed to be to add a Python layer to the bindings so that the 1D numpy arrays can be reshaped into 2D numpy array views before calling the C++ extension. As part of this refactoring, the default values for optional parameters are also removed, and the function parameter types are specified directly in the Python layer.
Showing
+201 -3
evalhyd/__init__.py
0 → 100644
evalhyd/evald.py
0 → 100644
evalhyd/evalp.py
0 → 100644
Please register or sign in to comment