NumpyTensorSpace.byaxis

property NumpyTensorSpace.byaxis

Return the subspace defined along one or several dimensions.

Examples

Indexing with integers or slices:

>>> space = odl.rn((2, 3, 4))
>>> space.byaxis[0]
rn(2)
>>> space.byaxis[1:]
rn((3, 4))

Lists can be used to stack spaces arbitrarily:

>>> space.byaxis[[2, 1, 2]]
rn((4, 3, 4))