numpy.repeat函数 numpy.repeat函数的主要作用:重复数组的元素。 用法 import numpy as np np.repeat(a, repeats, axis=None) 参数 a:给定数组; repeats:指定重复次数; axis:指定轴。 实例 实例1 b = np