bugGNU Octave - Bugs: bug #51582, arrayfun with @isa

 
 

bug #51582: arrayfun with @isa

Submitter:  Ernst Reissner <ernstreissner>
Submitted:  Wed 26 Jul 2017 10:55:53 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 27 Jul 2017 08:07:56 AM UTC, comment #2: 

Thank you Mike, this is the solution.
You can close this report.

Ernst Reissner <ernstreissner>
Wed 26 Jul 2017 05:43:30 PM UTC, comment #1: 

Keep in mind that ["numeric" "float" "integer"] is the same thing as a single string "numericfloatinteger" because of the way char row vector concatenation works.

This works for me instead


arrayfun(@isa, [1 2 3], {"numeric" "float" "integer"})


Please try your examples with a cell array of class/type names, is there still a bug?

Mike Miller <mtmiller>
Group Member
Wed 26 Jul 2017 10:55:53 AM UTC, original submission:  

arrayfun(@isa, [1 2 3], ["numeric" "float" "integer"])
yields
error: arrayfun: dimensions mismatch
although i would expect invoking
isa(1,"numeric") and so on.

Hint:
If I use my own class overwriting isa, calling
arrayfun(@isa, [pn(), pn(), pn()], ["numeric" "float" "integer"])
I obtain
error: 'classname' undefined near line 51 column 10
and it seems as if arrayfun would call isa without second argument.

Ernst Reissner <ernstreissner>

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by ernstreissner (Submitted the item)
  • -email is unavailable- added by ernstreissner
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-07-27 mtmiller StatusNeed Info Works For Me
        Open/ClosedOpen Closed
    2017-07-26 mtmiller StatusNone Need Info
    2017-07-26 ernstreissner Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code