I am working with a csr_matrix (from scipy.sparse) and I need to apply a logarithm-like function on all its items.
f:x->log(x+1), so f(0)=0).
What would be the efficient way of doing that ?
I could not found any map function for csr_matrix, do I have forgotten one ?
What about (specifically for this function) log1p?
See the scipy documentation: http://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.csr_matrix.log1p.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With