[SciPy-user] fast max() on sparse matrices
nicky van foreest
Tue Jan 6 01:50:16 CST 2009
Thanks for your feedback.
> For conformity with dense matrices, max() should return zero if the
> nonzero entries of the matrix are all negative and there is at least
> one missing value in the matrix. This might surprise people who
> expect the largest nonzero value instead. For instance,
> csr_matrix([[0,-1]]).max() should be 0.
To bring things in line with dense matrices a norm operator would be
the most logical, so that norm(A, infty) would yield the max of the
absolute values, etc. I suppose this will be more difficult than
implementing max(), but anyway that is what I ultimately would expect
to use and be consistent with the dense matrices.
More information about the SciPy-user