Skip to main content

Module shape

Module shape 

Source
Expand description

Layout kernels: broadcast, transpose, squeeze, expand, select, take, concat.

Axes are addressed by dimension name. Layout kernels keep the attributes.

Structs§

Slice
A Python-style slice: start:stop:step. Negative indices count from the end.

Enums§

PadMode
How pad fills the new positions, like the mode of numpy.pad.
Selector
A selection on one axis for isel.

Functions§

broadcast_arrays
Broadcast all arrays onto their shared dimensions, see Dimensions::broadcast.
broadcast_to
Broadcast a onto target without a copy where possible.
concat
Join arrays along an existing dimension, like numpy.concatenate.
expand_dims
Insert a new axis of size 1 at position axis, without a copy.
flip
Reverse the order along dim, like numpy.flip.
isel
Select by position on one or more axes, like xarray isel, in one copy.
move_dim
Move dimension name to position to.
pad
Add before and after positions along dim, like numpy.pad.
rename_dims
Rename dimensions without a copy.
repeat
Repeat each element repeats times along dim, like numpy.repeat.
roll
Roll the elements along dim by shift, like numpy.roll.
squeeze
Remove size-1 axes without a copy. None removes every size-1 axis.
stack
Join arrays along a new dimension at position axis, like numpy.stack.
take
Take indices along dim, like numpy.take(a, indices, axis).
tile
Repeat the whole array reps times along dim, like numpy.tile.
transpose
Reorder the axes. order must name every dimension once.
transpose_reversed
Reverse the axis order, like ndarray.T.