I want to take both the argmax and max along an axis of a scipy.sparse matrix X
>>> type(X)
scipy.sparse.csr.csr_matrix
>>> idx = X.argmax(axis=0)
>>> maxes = X.max(axis=0)
I don't want to have to compute the max twice, but I can't use the same approach to this as if X
were a np.ndarray. How can I apply the indices from argmax to X
?