Skip to content

Slices should return views, not copies #8

@Ivorforce

Description

@Ivorforce

This is a hard one. Current NDArray already uses shared_ptr for other reasons, but every NDArray would have to keep track of its particular view into the array as well.

This might be possible by keeping a tuple of 'view semantics', which will be passed to xtv functions when set. Subsequent views would have to be concatenated into the first, probably requiring a special function, but it should be possible. Besides, just single-level views would already be tremendously useful on their own.

Alternatively, it might be possible to adapt xarray to make a custom subclass that already keeps track of strides. This might be considerably harder though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestimportantIssues that should be addressed soon.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions