推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Hlianbobo
V2EX  ›  Python

Python 或 sage 有没有哪个函数可以求指定向量的模?进行点乘运算,叉乘运算。

  •  
  •   Hlianbobo · Oct 1, 2020 · 2500 views
    This topic created in 2188 days ago, the information mentioned may be changed or developed.
    python 或 sage 有没有哪个函数可以求指定向量的模?进行点乘运算,叉乘运算?求相关的库名称已经代码示例,谢谢!
    3 replies  •  2020-10-01 20:17:59 +08:00
    zhzy
        1
    zhzy  
       Oct 1, 2020 via iPhone
    numpy
    Tony042
        2
    Tony042  
       Oct 1, 2020
    numpy,或者自己求模就是该矩阵的 hermitian matrix 乘以它本身,点乘就是求模开个方,叉乘算 det
    TransAM
        3
    TransAM  
       Oct 1, 2020 via Android
    numpy 的话:

    mod = np.sum(arr ** 2) ** 0.5
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5066 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 06:28 · PVG 14:28 · LAX 23:28 · JFK 02:28
    ♥ Do have faith in what you're doing.