bugGNU Octave - Bugs: bug #45487, isa function not working when...

 
 

bug #45487: isa function not working when checking for multiple classes

Submitted by:  None
Submitted on:  Tue 07 Jul 2015 08:06:43 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: giangiOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.2
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 07 Jul 2015 08:44:10 PM UTC, comment #1:

Thank you for the bug report.

This specific bug has already been fixed on the current release of Octave (4.0.0).

Carnë Draug <carandraug>
Project Member
Tue 07 Jul 2015 08:06:43 PM UTC, original submission:

Hi here is the description for the isa function
Function File: isa (obj, classname)
...
...

If classname is a cell array of string, a logical array of the same size is returned, containing true for each class to which obj belongs to.

Here is an experiment

>> isa(rand(10),{'numeric','logical'})

ans =

0 0

>> isa(rand(10),{'numeric'})

ans = 1
which is incompatible (but correct) with the above result.
This is used in the validateattributes.m and was giving me the wrong result (that means that the bug is propagated to the above function) and that's how i found out.
Cheers
giangi

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 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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 07 Jul 2015 08:44:10 PM UTCcarandraugStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1