import numpy a=numpy.arange(27).reshape(3,3,3) b=numpy.arange(12) c=numpy.reshape(b,(2,3,2)) #修改為三維陣列 #將多維陣列修改為一維陣列 d=c.reshape(12) e=c.reshape(-1) #通過ravel,flatten,將多維陣列轉化為一維陣列 f=c.ravel() g=c.flatten()
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/124172.html
標籤:Python
上一篇:第1章-起 步
