import numpy as np a = np.array([[1, 1, 2, 2], [3, 4, 5, 6], [7, 7, 7, 8]]) count = np.array([3, 1, 2]) print(np.repeat(a, count, axis=0))
確定! 回上一頁