Skip to content

Reshaping variable for indexing #473

@fsteinmetz

Description

@fsteinmetz

Due to the different behaviours of integer array indexing between netcdf4-python and numpy, I am missing the ability of indexing dependent axes, in which for example, data[arange(3), arange(3)] returns an array of shape (3,)
This behaviour could be circumvented by using numpy's ravel_multi_index and reshaping a variable to a single dimension. So, is it possible to reshape a variable without copying it ?

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