cupy.expand_dims#

cupy.expand_dims(a, axis)[source]#

Expands given arrays.

Parameters
  • a (cupy.ndarray) – Array to be expanded.

  • axis (int) – Position where new axis is to be inserted.

Returns

The number of dimensions is one greater than that of the input array.

Return type

cupy.ndarray