数组操作

查看数组有多少类别

import numpy as np
array = [1,2,3,2,1,2,1]
np.unique(array)

-------------------------
array([1, 2, 3])
# x
np.sum(x)

最后更新于

这有帮助吗?