sparse indexing issue
David Bateman
adb014 at gmail.com
Tue Dec 18 15:14:58 CST 2007
John W. Eaton wrote:
> On 18-Dec-2007, David Bateman wrote:
>
> | Kim Hansen wrote:
> | > On 12/17/07, David Bateman <David.Bateman at motorola.com> wrote:
> | >
> | >> Thomas Kasper wrote:
> | >>
> | >>> Bug report for Octave 2.9.19+ configured for i686-pc-linux-gnu
> | >>>
> | >>> Description:
> | >>> -----------
> | >>> row and column reproduction via index operations do not seem
> | >>> to work properly for sparse matrices
> | >>>
> | >
> | > I am not sure if this is the same or an other bug, but this is a
> | > little surprising:
> | > =============
> | > octave:1> sparse(42)([1 1])
> | > ans =
> | >
> | > Compressed Column Sparse (rows = 1, cols = 2, nnz = 2)
> | >
> | > (1, 2) -> 42
> | > (1, 2) -> 42
> | > =============
> | >
> | >
> | Its the same bug.. I'm working on it, but its fighting back :-)
>
> How is this a bug? I thought that was the expected behavior when
> indexing a 1x1 object with a matrix in Matlab.
>
> jwe
>
>
The attached patch fixes all the bugs reported in this thread. These
bugs are either only recent (Change from 9th Oct to speed up the sparse
indexing) or only became obvious due to recent changes (cf
sparse_auto_mutate) for the sparse(42)([1,1]) case. I added test cases
for them so that they shouldn't creep back.
D.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch9
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20071218/9711120f/attachment.ksh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch9.changelog
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20071218/9711120f/attachment-0001.ksh
More information about the Bug-octave
mailing list