Python之二維數組(list與numpy.array)

一、python中的二維數組,主要有list和numpy.array兩種  >>import numpy as np >>a=[[1,2,3],[4,5,6],[7,8,9]] >>a [[1,2,3],[4,5,6],[7,8,9]] >>type(a) <type 'list'> >>b=np.array(a)"""List 轉爲 array""" >>type(b) <type 'num
相關文章
相關標籤/搜索