def test_B():
print 'test_B'
random.seed()
a=B(*svd(random.random((3,3))))
print 'a:\n%s'%a.M
b=random.random((3,3))
print 'b:\n%s'%b
c1,c2=b.dot(a.M),a.ldot(b)
print 'dot(b,a):\n%s'%c1
print 'a.ldot(b):\n%s'%c2.M
print 'the difference:\n%s'%(c1-c2.M)
d1,d2=a.M.dot(b),a.rdot(b)
print 'a.dot(b):\n%s'%d1
print 'a.rdot(b):\n%s'%d2.M
print 'the difference:\n%s'%(d1-d2.M)
print
评论列表
文章目录