Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

查看数组有多少类别

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

-------------------------
array([1, 2, 3])

# x
np.sum(x)