octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #32012] isnumeric() incorrectly reports true f


From: Rik
Subject: [Octave-bug-tracker] [bug #32012] isnumeric() incorrectly reports true for sparse logical matrices
Date: Thu, 30 Dec 2010 17:32:47 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/9.10 (karmic) Firefox/3.6.13

URL:
  <http://savannah.gnu.org/bugs/?32012>

                 Summary: isnumeric() incorrectly reports true for sparse
logical matrices
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Thu 30 Dec 2010 09:32:47 AM PST
                Category: Libraries
                Severity: 4 - Important
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32012>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]