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

 
 

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

Submitted by:  None
Submitted on:  Sat 20 Dec 2014 11:51:11 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Elias VanderstuyftOriginator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project Administrator
Mon 22 Dec 2014 12:22:03 AM UTC, comment #5:

Fixed for me. Thanks.

Michael Godfrey <godfrey>
Project 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>
Project 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>
Project 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>
Project 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

Does that produce a 2x12 sparse array?

John W. Eaton <jwe>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 29 Dec 2014 05:22:34 PM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Sat 20 Dec 2014 01:30:29 PM UTCjweStatusNone=>Need Info
      Release3.6.4=>dev

    Back to the top


    Powered by Savane 3.1-cleanup1