bugGNU Octave - Bugs: bug #63379, Implement is* functions

 
 

bug #63379: Implement is* functions

Submitter:  Guillaume <gyom>
Submitted:  Thu 17 Nov 2022 04:38:52 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 18 Nov 2022 08:06:07 PM UTC, comment #3: 

For clarity going forward, the list of isXXX functions to implement is


iscalendarduration
iscategorical
isdatetime
isduration
isenum
istable
istabular
istall
istimetable


A template for what these functions should look like is the function isstring.m.  The principal work will be to update the documentation for each function and to update the name of the class in the call to isa().

Rik <rik5>
Group administrator
Fri 18 Nov 2022 05:31:10 PM UTC, comment #2: 

You are correct that iscodistributed, isdistributed, isgpuarray and isreplicated are from the Parallel Computing Toolbox so can be ignored for now. The other ones, including istall, seem to be in core Matlab. I'm nearly surprised that there isn't a isdictionary.

Guillaume <gyom>
Thu 17 Nov 2022 10:41:51 PM UTC, comment #1: 

I don't think there is an objection to adding functions that would be Matlab compatible, even if they did return false because these classes are not implemented in Octave yet.

I would, however, only include functions that are in core Matlab.  I didn't do an extensive check but "isgpuarray" and "isreplicated" don't seem to be in core Matlab.

Rik <rik5>
Group administrator
Thu 17 Nov 2022 04:38:52 PM UTC, original submission:  

Having is<class> available for classes that are not yet implemented in Octave would be useful for compatibility with Matlab. This is, for example, already the case with isstring, even if, as commented in bug #50855, it would be better if the implementation was returning 'isa (s, "CLASS")' instead of 'false'. isStringScalar is also available in the same bug report.

Other functions that could be implemented in the same way are listed below:


iscalendarduration
iscategorical
iscodistributed
isdatetime
isdistributed
isduration
isenum
isgpuarray
isreplicated
istable
istabular
istall
istimetable


Would you consider their inclusion in Octave even if the corresponding class is not there yet?

Guillaume <gyom>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by gyom (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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-11-17 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code