larray.Axis.subaxis¶
-
Axis.
subaxis
(self, key)[source]¶ Returns an axis for a sub-array.
- Parameters
- keyint, or collection (list, slice, array, Array) of them
Indices-based key to use for the new axis.
- Returns
- Axis
Subaxis. If key is a None slice, the original Axis is returned. If key is an Array, the list of axes is returned.
Examples
>>> age = Axis(range(100), 'age') >>> age.subaxis(range(10, 19)) Axis([10, 11, 12, 13, 14, 15, 16, 17, 18], 'age')