all() & sparse()
Hi all,
I'm curious if anyone else has noticed an odd behavior for the all() function with sparse matrices. Basically, it appears to be broken for small matrices (which I realize is atypical use for the use of sparse).
For example, just taking the simple case:
all([1 0]) returns 0 as it should, but
all(sparse([1 0])) also returns 1
This doesn't just apply to vectors, but also to matrices:
all([1 0; 1 0; 0 1;]) returns [0 0], and
all([1 0; 1 0; 0 1;],2) returns [0 0 0]',
but:
all(sparse([1 0; 1 0; 0 1;])) returns [1 0]
(all(sparse([1 0; 1 0; 0 1;]),2) returns the appropriate column vector)
This is with octave 3.2, tested both with the mac OS X binary, as well as a source install on a kubuntu box.
Am I just missing something, and has anyone else seen this behavior?