bugGNU Octave - Bugs: bug #37321, isequal doesn't work for sparse...

 
 

bug #37321: isequal doesn't work for sparse matrcies

Submitter:  Jordi Gutiérrez Hermoso <jordigh>
Submitted:  Mon 10 Sep 2012 09:44:50 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  jordigh
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Aug 2013 06:10:57 PM UTC, comment #3: 

Thanks, pushed your patch, with minor modifications (changed "sparsematrix" to "sparse matrices" and added a space after the first line in the commit message):

http://hg.savannah.gnu.org/hgweb/octave/rev/79d4b6089968

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Mon 19 Aug 2013 10:50:53 AM UTC, comment #2: 

Attached patch fixes this bug, hopefully without breaking something else :)

(file #28875)

Stefan Mahr <dac922>
Tue 11 Sep 2012 06:10:10 AM UTC, comment #1: 

This looks like two bugs in one.

First, for the example you give, _isequal_ is computing


all (sparse (0, 1))


and getting the sparse(1,1) result.  But


all (zeros (0, 1))


produces logical(1).  So shouldn't the sparse version produce logical (sparse (1))?  Then the second bug is that isequal should be returning a full matrix in this case instead of sparse.

John W. Eaton <jwe>
Group administrator
Mon 10 Sep 2012 09:44:50 PM UTC, original submission:  

This should produce 1, but instead it produces zero scalar sparse matrix:


isequal (sparse (2, 2), sparse (2, 2))


I'll work on this later.

Jordi Gutiérrez Hermoso <jordigh>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28875:  isequal_sparse.diff added by dac922 (3KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by dac922 (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by jordigh (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-21 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2013-08-19 dac922 Attached File- Added isequal_sparse.diff, #28875

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code