numpy中的ndarry_bool对ndarray索引
The second way of indexing with booleans is more similar to integer indexing; for each dimension of the array we give a 1D boolean array selecting the slices we want:# []import numpy as npa = np.arange(12).reshape(3,4)b1 = np.array([True,True,True])
原创
2020-06-29 13:38:50 ·
482 阅读 ·
1 评论