cupy.hstack#

cupy.hstack(tup, *, dtype=None, casting='same_kind')[source]#

Stacks arrays horizontally.

If an input array has one dimension, then the array is treated as a horizontal vector and stacked along the first axis. Otherwise, the array is stacked along the second axis.

Parameters:
  • tup (sequence of arrays) – Arrays to be stacked.

  • dtype (str or dtype) – If provided, the destination array will have this dtype.

  • casting ({‘no’, ‘equiv’, ‘safe’, ‘same_kind’, ‘unsafe’}, optional) – Controls what kind of data casting may occur. Defaults to 'same_kind'.

Returns:

Stacked array.

Return type:

cupy.ndarray

See also

numpy.hstack()