Python--X[:,0],X[:,1],X[:,3]的區別

X[:,0]是numpy中數組的一種寫法,主要用於獲取數組中的元素數組 X[:,0]---第一位元素數組code X[:,1]---第二位元素的數組blog X[:,2]----第三位元素數組class 代碼import import numpy as np X = np.array([[2,1,1],[4,3,2],[6,5,3],[1,7,4],[7,9,5],[12,11,6],[16,1
相關文章
相關標籤/搜索