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

 
 

bug #51582: arrayfun with @isa

Submitted by:  Ernst Reissner <ernstreissner>
Submitted on:  Wed 26 Jul 2017 10:55:53 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Unexpected Error
Status: Works For MeAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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

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

Mike Miller <mtmiller>
Project Administrator
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 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 mtmiller (Posted a comment)
  • -unavailable- added by ernstreissner (Submitted the item)
  • -unavailable- added by ernstreissner
  •  

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

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 27 Jul 2017 08:27:33 PM UTCmtmillerStatusNeed Info=>Works For Me
      Open/ClosedOpen=>Closed
    Wed 26 Jul 2017 05:43:30 PM UTCmtmillerStatusNone=>Need Info
    Wed 26 Jul 2017 10:55:53 AM UTCernstreissnerCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1