bugGNU Octave - Bugs: bug #32012, isnumeric() incorrectly reports...

 
 

bug #32012: isnumeric() incorrectly reports true for sparse logical matrices

Submitter:  Rik <rik5>
Submitted:  Thu 30 Dec 2010 05:32:47 PM UTC
   
 
Category:  Libraries Severity:  4 - Important
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  highegg
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 02 Jan 2011 11:35:22 AM UTC, comment #1: 

Fix is uploaded, thx.

Jaroslav Hajek <highegg>
Thu 30 Dec 2010 05:32:47 PM UTC, original submission:  

isnumeric() should report true only for objects which are integer, real, or complex arrays; logical and character arrays are excluded.  The function works correctly on full matrices but not on sparse ones.


octave:4> a = true(2)
a =

   1   1
   1   1

octave:5> isnumeric (a)
ans = 0
octave:6> b = sparse (a)
b =

Compressed Column Sparse (rows = 2, cols = 2, nnz = 4 [1e+02%])

  (1, 1) ->  1
  (2, 1) ->  1
  (1, 2) ->  1
  (2, 2) ->  1

octave:7> typeinfo (b)
ans = sparse bool matrix
octave:8> isnumeric (b)
ans =  1


Rik <rik5>
Group administrator

 

(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 highegg (Posted a comment)
  • -email is unavailable- added by rik5 (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
    2011-01-02 highegg StatusNone Fixed
        Assigned toNone highegg
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code