cupy.concatenate#

cupy.concatenate(tup, axis=0, out=None, *, dtype=None, casting='same_kind')[source]#

沿轴连接数组。

参数:
  • tup (sequence of arrays) – 要连接的数组序列。除指定轴外,所有数组应具有相同的维度。

  • axis (int or None) – 沿此轴连接数组。如果 axis 为 None,则在使用前会将数组展平。默认为 0。

  • out (cupy.ndarray) – 输出数组。

  • dtype (str or dtype) – 如果提供,目标数组将具有此 dtype。不能与 out 同时提供。

  • casting ({‘no’, ‘equiv’, ‘safe’, ‘same_kind’, ‘unsafe’}, optional) – 控制可能发生的数据类型转换。默认为 'same_kind'

返回:

连接后的数组。

返回类型:

cupy.ndarray

另请参阅

numpy.concatenate()