Skip to content

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

@tdegeus

Description

@tdegeus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions