您可以简单地将矩阵转换为
matrix.tolist(),以证明:
>>> import numpy>>> a = numpy.ones((2,4))>>> aarray([[ 1., 1., 1., 1.], [ 1., 1., 1., 1.]])>>> a.tolist()[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]>>> type(a.tolist())<type 'list'>>>> type(a.tolist()[0])<type 'list'>



