Python新手,在numpy中掙扎,希望有人能幫助我,謝謝!Python如何在numpy中結合兩個矩陣
from numpy import *
A = matrix('1.0 2.0; 3.0 4.0')
B = matrix('5.0 6.0')
C = matrix('1.0 2.0; 3.0 4.0; 5.0 6.0')
print "A=",A
print "B=",B
print "C=",C
結果:
A= [[ 1. 2.]
[ 3. 4.]]
B= [[ 5. 6.]]
C= [[ 1. 2.]
[ 3. 4.]
[ 5. 6.]]
問題:如何使用A和B生成C,像MATLAB C=[A;B]
?