python数组转列表

 

>>> import numpy as np
>>> a = np.array([[1,2],[3,4]])
>>> b=a.tolist()
>>> b
[[1, 2], [3, 4]] 

 

posted on 2021-07-18 11:59  一杯明月  阅读(375)  评论(0)    收藏  举报