What to do with sparse(sparse(2),1) ?
David Bateman
David.Bateman at motorola.com
Tue Dec 11 09:31:10 CST 2007
Kim Hansen wrote:
> I am not really sure what the bug is here as the help in sparse seems
> to have a cut and paste error:
> =========================
> octave:4> help sparse
> -- Loadable Function: S = sparse (A)
> Create a sparse matrix from the full matrix A. is forced back to
> a full matrix is resulting matrix is sparse
>
> -- Loadable Function: S = sparse (A, 1)
> Create a sparse matrix and convert it back to a full matrix. is
> forced back to a full matrix is resulting matrix is sparse
> =========================
>
> The problem I saw was that these two results were different:
> =========================
> octave:1> sparse(2,1)
> ans =
>
> Compressed Column Sparse (rows = 2, cols = 1, nnz = 0)
>
>
> octave:2> sparse(sparse(2),1)
> ans = Compressed Column Sparse (rows = 1, cols = 1, nnz = 1)
>
> (1, 1) -> 2
> octave:3>
>
If you want to address this one then the attached patch should do it.
D.
--
David Bateman David.Bateman at motorola.com
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch9
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20071211/f08d83b8/attachment-0002.ksh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch9.changelog
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20071211/f08d83b8/attachment-0003.ksh
More information about the Bug-octave
mailing list