cunumeric.squeeze#

cunumeric.squeeze(a, axis=None)#

Remove single-dimensional entries from the shape of an array.

Parameters
  • a (array_like) – Input data.

  • axis (None or int or tuple[int], optional) – Selects a subset of the single-dimensional entries in the shape. If an axis is selected with shape entry greater than one, an error is raised.

Returns

squeezed – The input array, but with all or a subset of the dimensions of length 1 removed. This is always a itself or a view into a.

Return type

ndarray

Raises

ValueError – If axis is not None, and an axis being squeezed is not of length 1

See also

numpy.squeeze

Availability

Multiple GPUs, Multiple CPUs