Numpy and Scipy matrix inversion functions differences
我的问题很简单:矩阵求逆的
scipy函数只是numpy函数的包装吗?效率,数值稳定性,速度…我更喜欢哪一个?
谢谢!
从scipy文档中可以获得以下信息:
scipy.linalg vs numpy.linalg
scipy.linalg contains all the functions innumpy.linalg . plus some other more advanced ones not contained innumpy.linalg
Another advantage of usingscipy.linalg overnumpy.linalg is that it is always compiled with BLAS/LAPACK support, while fornumpy this is optional. Therefore, thescipy version might be faster depending on hownumpy was installed.Therefore, unless you don’t want to add
scipy as a dependency to yournumpy program, usescipy.linalg instead ofnumpy.linalg
号
希望这有帮助!