cf.Index.subspace¶

Index.
subspace
()¶ Return a new variable whose data is subspaced.
This attribute may be indexed to select a subspace from dimension index values.
Subspacing by indexing
Subspacing by dimension indices uses an extended Python slicing syntax, which is similar numpy array indexing. There are two extensions to the numpy indexing functionality:
TODO
Size 1 dimensions are never removed.
An integer index i takes the ith element but does not reduce the rank of the output array by one.
When advanced indexing is used on more than one dimension, the advanced indices work independently.
When more than one dimension’s slice is a 1d boolean array or 1d sequence of integers, then these indices work independently along each dimension (similar to the way vector subscripts work in Fortran), rather than by their elements.
Examples:
TODO