mm.math.expand_dims

math.expand_dims(axis)

The array with an additional dimension inserted at the given axis.

Parameters:
  • array (ndarray[Tuple[int, ...], Union[TypeVar(R, float16, float32, float64), TypeVar(C, complex64, complex128), TypeVar(Z, int16, int32, int64), TypeVar(N, uint16, uint32, uint64)]]) – The array to expand.

  • axis (int) – The axis to insert the new dimension.

Return type:

ndarray[Tuple[int, ...], Union[TypeVar(R, float16, float32, float64), TypeVar(C, complex64, complex128), TypeVar(Z, int16, int32, int64), TypeVar(N, uint16, uint32, uint64)]]

Returns:

The array with an additional dimension inserted at the given axis.