Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable load cast xt::xtensor<...> #264

Open
tdegeus opened this issue May 30, 2021 · 0 comments
Open

Enable load cast xt::xtensor<...> #264

tdegeus opened this issue May 30, 2021 · 0 comments

Comments

@tdegeus
Copy link
Member

tdegeus commented May 30, 2021

Sometimes my API simply does not permit easily to template, or I just want to wrap quick and dirty, or on needs to work around a bug. For these case I still want to be able to wrap

void foo(const xt::xtensor<double, 1>& a);

Currently this is explicitly prohibited in xtensor-python

bool load(handle /*src*/, bool)
{
return false;
}

I find this too restrictive, and I think that xtensor-python should have a way to do it, for instance by setting a flag or include a header. We should give the possibility to work around something, even if it comes at the cost of a copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant