Is it possible to use python "scipy" linear algebra library from spark/scala script?
I need to use the rich sparse functions in the "scipy" library but my project is already in scala
It's not feasible to use SciPy from Scala, because Python is no JVM language, but there seem to be ways. The closest you might get in pure Scala is to use Scalanlp-Breeze. You can check out their Comparison with Matlab and Numpy. Their is a SparseMatrix datastructure, you should look at that.
Make sure you properly install the native libraries if you want to get the full performance.
I think it is not possible to use scipy if you want to take the concurrent computing advantage of spark, because scipy is not designed for spark.
If you only want to use it in a local machine in scala script, you can try java-python-integration. Or you can use scipy-like lib in Java instead.
scipycode is written in Python with heavy use ofnumpy.numpyhas a lot of compiled code. So does thescipy.sparse. Some of the linear algrabra stuff uses external compiled libraries, ones can be used by other code. But that's a c/c++/Fortran task.