cupy.moveaxis#

cupy.moveaxis(a, source, destination)[源代码][源代码]#

将数组的轴移动到新位置。

其他轴保持其原始顺序。

参数:
  • a (cupy.ndarray) – 应重新排序其轴的数组。

  • source (int or sequence of int) – 要移动的轴的原始位置。这些位置必须是唯一的。

  • destination (int or sequence of int) – 每个原始轴的目标位置。这些也必须是唯一的。

返回:

移动轴后的数组。该数组是输入数组的视图。

返回类型:

cupy.ndarray

参见

numpy.moveaxis()