Slicing in sparse
John W. Eaton
jwe at bevo.che.wisc.edu
Tue Dec 4 14:51:12 CST 2007
On 4-Dec-2007, Kim Hansen wrote:
| I don't really care about what the matrices do when expanded with a
| single index, but I think full and sparse should do the same in all
| instances where they are expanded with two indices.
|
| The only case where my test fails now is:
|
| octave:20> x=sparse(ones(2)), x([],:)=2
| x =
|
| Compressed Column Sparse (rows = 2, cols = 2, nnz = 4)
|
| (1, 1) -> 1
| (2, 1) -> 1
| (1, 2) -> 1
| (2, 2) -> 1
|
| x =
|
| Compressed Column Sparse (rows = 2, cols = 2, nnz = 0)
|
|
| octave:21>
Please try the following patch. Note that while looking at this, I
think I found another inconsistency in Matlab's behavior (see the
comment in the patch).
Thanks,
jwe
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20071204/0fcc853a/attachment.ksh
More information about the Bug-octave
mailing list