Issue
Both SciPy and Numpy have built in functions for singular value decomposition (SVD). The commands are basically scipy.linalg.svd
and numpy.linalg.svd
. What is the difference between these two? Is any of them better than the other one?
Solution
From the FAQ page, it says scipy.linalg
submodule provides a more complete wrapper for the Fortran LAPACK library whereas numpy.linalg
tries to be able to build independent of LAPACK.
I did some benchmarks for the different implementation of the svd
functions and found scipy.linalg.svd
is faster than the numpy counterpart:
However, jax wrapped numpy, aka jax.numpy.linalg.svd
is even faster:
Full notebook for the benchmarks are available here.
Answered By - Zichen Wang
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.