bugGNU Octave - Bugs: bug #43855, Matlab compatibility: allow...

 
 

bug #43855: Matlab compatibility: allow indexing of sparse matrix with an N-D Array

Submitter:  None
Submitted:  Sat 20 Dec 2014 11:51:11 AM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Elias Vanderstuyft Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 29 Dec 2014 05:22:34 PM UTC, comment #6: 

Fixed on the development branch.  The original reporter will need to build from Mercurial source, or wait until the 4.2 release in order to see the change.

Rik <rik5>
Group administrator
Mon 22 Dec 2014 12:22:03 AM UTC, comment #5: 

Fixed for me. Thanks.

Michael Godfrey <godfrey>
Group Member
Sun 21 Dec 2014 10:54:32 PM UTC, comment #4: 

Oops, I checked in this additional change:

  http://hg.savannah.gnu.org/hgweb/octave/rev/06b23f224f52

John W. Eaton <jwe>
Group administrator
Sun 21 Dec 2014 04:24:36 PM UTC, comment #3: 

Looks like a problem with this:
  sparse.tst ..................................................array/Array.cc:1609: Array<T> Array<T>::transpose() const [with T = int]: Assertion `ndims () == 2' failed.
panic: Aborted -- stopping myself...
octave exited with signal 6

(on Fedora 21 x64)

Michael Godfrey <godfrey>
Group Member
Sun 21 Dec 2014 06:02:01 AM UTC, comment #2: 

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/e354372e20f2

I think this fixes the problem on the default development branch.

John W. Eaton <jwe>
Group administrator
Sat 20 Dec 2014 01:30:29 PM UTC, comment #1: 

Since sparse arrays have at most two dimensions, it looks like the third and higher dimensions of the index are smashed into the second?  If so, this should be fairly easy to fix.  To be clear, what is the result of something like


s = sparse (rand(1,1)); s(ones(2,3,4))


Does that produce a 2x12 sparse array?

John W. Eaton <jwe>
Group administrator
Sat 20 Dec 2014 11:51:11 AM UTC, original submission:  

In Octave:

octave:1> s=sparse(rand(1,1)); s(ones(1,1,2))
error: cannot index sparse matrix with an N-D Array


In MATLAB:

>> s=sparse(rand(1,1)); s(ones(1,1,2))

ans =
   (1,1)       0.8147
   (1,2)       0.8147

Anonymous

 

(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 godfrey (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by None (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-12-29 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2014-12-20 jwe StatusNone Need Info
        Release3.6.4 dev

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code