stack

Contents

stack#

penzai.core.named_axes.stack(arrays: Sequence[NamedArrayBase], axis_name: AxisName) NamedArray | NamedArrayView[source]#

Stacks a sequence of named arrays along a named axis.

Parameters:
  • arrays – Sequence of named arrays to stack, which must have the same shape.

  • axis_name – Name of the axis along which to stack.

Returns:

A new stacked array.