I have a sparse matrix:
from scipy import sparse
a = sparse.diags([1,4,9],[-1,0,1],shape =(10,10),format ="csr")
I want to take the square root of each of the elements in the sparse matrix I look up on the internet and it says I can use numpy.sqrt() to implement this. But error occurs:
b = numpy.sqrt(a)
AttributeError: sqrt
How can I do it?