Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我即将在 python 中编写我自己的缩放、旋转、规范化函数。有没有方便的方法来避免这种情况?我找到了 NumPy,但对于我的小 2D 需求来说,它似乎有点过头了。
标准 python 库中是否有可用的基本向量操作?
不,中的标准numpy。我不会认为它是矫枉过正,将其视为一个编写良好且经过测试的库,即使您只需要它的一小部分。所有基本的向量和矩阵运算都有效地实现(回退到 C 和 Fortan),这使其快速且内存高效。不要自己制作,使用 numpy.
numpy