Skip to content

How to get all the sub-sub-views in an array? #1002

@frjnn

Description

@frjnn

Given a four dimensional array of shape (X, Y, Z, W) is there a concise way to get all the (X x Y) 2-dimensional sub-sub-views of shape (Z,W)? (or all the the (A x B) 3-dimensional sub-sub-views of shape (C, D, E) in a 5-dimensional array of shape (A, B, C, D, E)

Addendum: currently I'm doing it by reshaping to (XY, Z, W) and using axis_iter.

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