dpctl.tensor.concat(arrays, axis)[source]

Joins a sequence of arrays along an existing axis.

  • arrays (Union[List[usm_ndarray, Tuple[usm_ndarray,...]]]) – input arrays to join. The arrays must have the same shape, except in the dimension specified by axis.

  • axis (Optional[int]) – axis along which the arrays will be joined. If axis is None, arrays must be flattened before concatenation. If axis is negative, it is understood as being counted from the last dimension. Default: 0.


An output array containing the concatenated values. The output array data type is determined by Type Promotion Rules of array API.

Return type:


All input arrays must have the same device attribute. The output array is allocated on that same device, and data movement operations are scheduled on a queue underlying the device. The USM allocation type of the output array is determined by USM allocation type promotion rules.