any(x,2) on sparse gives bad result

Kim Hansen kimhanse at gmail.com
Mon Jan 7 11:07:31 CST 2008


On Jan 7, 2008 4:41 PM, David Bateman <David.Bateman at motorola.com> wrote:
>
> The issue is that as the sparse matrix is stored in a compressed column
> format and so the inner loop of the sparse indexing is over the rows and
> not the columns, the test macro in the any/all functions for dim = 2 can
> not break, as it could in the case of dim = 1 or full matrices.
> Therefore the attached patch is needed, and this fixes the issue for me.
> That is
>
> load x.gz
> all (any(full(x),2) == full(any(x,2)))
>
> ans = 1

Thanks a lot.

John, what is the plan for a 3.0.1 bug fix release ?

> Kim, keep those bug reports coming, as your finding a lot of issues with
> the sparse code :-)

I will send a new report in a few minutes :)

-- 
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437  --  Mobil: 3091 2437



More information about the Bug-octave mailing list