若有帮助到你,记得点赞哦!
# -*- coding: utf-8 -*-
"""
Created on Sun Mar 25 09:58:19 2018
@author: Lelouch_C.C
"""
from numpy import *
a= mat([[1,2,3],
[4,5,6],
[7,8,9]])
c=a.tolist()
print(c)
"""
输出:
[[1, 2, 3], [4, 5, 6], [7, 8, 9]] #可以看出,tolist()将矩阵a转换为一个以列表为元素的列表
"""