DQMC.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:HamiltonianPy 作者: waltergu 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号