first = input("please enter 5x2 matrix \n")
first = np.array(first)
second = input("please enter 5x1 matrix \n")
second = np.array(second)
print(first.shape)
print(second.shape)
我得到的输出是:
请输入5x2矩阵
[[1,2],[3,4],[5,6],[7,8],[9,10]]
请输入5x1矩阵
[[0],[0],[1],[0],[0]]
()
()
我的矩阵的维数是5x2和5x1,但是shape属性为什么不能正确显示维数?