bugGNU Octave - Bugs: bug #66516, sparse matrix reverse indexing...

 
 

bug #66516: sparse matrix reverse indexing broken

Submitter:  Liang Tang <lt1234>
Submitted:  Tue 03 Dec 2024 02:37:13 AM UTC
   
 
Category:  Interpreter Severity:  4 - Important
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Confirmed Assigned to:  None
Originator Name:  lt1234 Open/Closed:  * Open
Release:  * 9.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  9.3.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 03 Dec 2024 10:23:52 PM UTC, comment #1: 

Confirmed.

Minimum working example simplified from original report


a = sparse (magic (3));
a(6:-1:4, 6:-1:4) = 100;


The sparse matrix is correctly expanded from 3x3 to 6x6, but then the assignment fails with the "nonconformant arguments" error.

Rik <rik5>
Group administrator
Tue 03 Dec 2024 02:37:13 AM UTC, original submission:  


Sometime, reverse indexing of a matrix is needed.  The small example below shows a particular case when reserve index might not work for sparse matrix. 


a=sparse(randi(1, 30,30)); a(31:+1:60,31:+1:60)=a;  whos a
a=full(  randi(1, 30,30)); a(60:-1:31,60:-1:31)=a;  whos a
a=sparse(randi(1, 30,30)); a(60:-1:31,60:-1:31)=a;  % failed

error: =: nonconformant arguments (op1 is 30x30, op2 is 30x29)

Liang Tang <lt1234>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by lt1234 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-12-03 rik5 Operating SystemMicrosoft Windows Any
        Planned ReleaseNone 9.3.0
        SummaryOne issue with sparse matrix reverse indexing sparse matrix reverse indexing broken
    2024-12-03 rik5 CategoryOctave Function Interpreter
        Severity3 - Normal 4 - Important
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.14-60ba.
    Corresponding source code