xtensor-python icon indicating copy to clipboard operation
xtensor-python copied to clipboard

xtensor-python in reverse: pyarray_view and pytensor_view?

Open matwey opened this issue 1 year ago • 0 comments

Hello,

I suppose it is a feature request.

I want to call a python function provided by a user from my C++ code. The function argument is numpy array the function result is numpy array as well. Yet it is obviously not possible to call this function lazily with xtensor code, I would like to provide xtensor or xarray as is to python side. Generally, it is possible via buffer protocol. It think it can be implemented using helpers pyarray_view<XContainer> and pytensor_view<XContainer>.

matwey avatar Jun 23 '24 11:06 matwey