Hello, I am a beginner with Python. How do I import and use the functions csrtodense and densetocsr contained in SciPy.sparse.sparsetools?
To import sparsetools use
But to use the functions? I tried with:Code:from scipy.sparse import sparsetools
(M is a matrix), but I get:Code:scipy.sparse.sparsetools.densetocsr (M)
Any idea?Traceback (most recent call last):
File "gcm.py", line 43, in <module>
scipy.sparse.sparsetools.densetocsr (M)
NameError: name 'SciPy' is not defined
Bookmarks