ones#
- penzai.core.named_axes.ones(named_shape: Mapping[AxisName, int], dtype: np.DTypeLike | None = None) NamedArray [source]#
Constructs a named array of ones with a given shape.
- Parameters:
named_shape – Named shape for the result.
dtype – Optional dtype for the result.
- Returns:
NamedArray with the given named shape, filled with ones.