Skip to content

Implement element preserving resize in 1d #2745

@tdegeus

Description

@tdegeus

In general shrinking with resize of xt::xtensor<double, 1> does preserve elements. It would be nice to have the option to do so (if the underlying container allows it. E.g.

xt::xtensor<double, 1> a = xt::empty<double>({1000});
...
a.resize({150}, /*preserve*/ true);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions