Element wise exp() of scipy sparse matrix
问题 I have a very big sparse csc_matrix x . I want to do elementwise exp() on it. Basically what I want is to get the same result as I would have got with numpy.exp(x.toarray()) . But I can't do that(my memory won't allow me to convert the sparse matrix into an array). Is there any way out? Thanks in advance! 回答1: If you don't have the memory to hold x.toarray() , you don't have the memory to hold the output you're asking for. The output won't be sparse; in fact, unless your input has negative