RectPartition.byaxis¶
-
property
RectPartition.
byaxis
¶ Object to index
self
along axes.Examples
Indexing with integers or slices:
>>> p = odl.uniform_partition([0, 1, 2], [1, 3, 5], (3, 5, 6)) >>> p.byaxis[0] uniform_partition(0.0, 1.0, 3) >>> p.byaxis[1] uniform_partition(1.0, 3.0, 5) >>> p.byaxis[2] uniform_partition(2.0, 5.0, 6) >>> p.byaxis[:] == p True >>> p.byaxis[1:] uniform_partition([ 1., 2.], [ 3., 5.], (5, 6))
Lists can be used to stack subpartitions arbitrarily:
>>> p.byaxis[[0, 2, 0]] uniform_partition([ 0., 2., 0.], [ 1., 5., 1.], (3, 6, 3))