看板 Python 關於我們 聯絡資訊
https://www.kaggle.com/halien/simple-image-classifer-with-svm data_images = digits.images.reshape((n_samples, -1)) 請問reshape 裡面 "-1" 是什麼意思? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.174.60.86 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1579948283.A.7B0.html
penut85420: 可以理解成自動判斷的意思 01/25 18:55
penut85420: 例如原本a.shape=(2, 3, 4) 01/25 18:55
penut85420: 則a.reshape(3, -1)=(3, 8) 01/25 18:55
mike50378: 那個項會自動填上整除的維度 01/26 13:57