Python中numpy庫unique函數解析

a = np.unique(A) 對於一維數組或者列表,unique函數去除其中重複的元素,並按元素由大到小返回一個新的無元素重複的元組或者列表 import numpy as np A = [1, 2, 2, 5,3, 4, 3] a = np.unique(A) B= (1, 2, 2,5, 3, 4, 3) b= np.unique(B) C= ['fgfh','asd','fgfh','a
相關文章
相關標籤/搜索