Commit d2a9450c authored by Thibault Hallouin's avatar Thibault Hallouin
Browse files

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.
parent 6c0730f2
Showing with 201 additions and 3 deletions
+201 -3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment