bugGNU Octave - Bugs: bug #40467, cellfun ignores...

 
 

bug #40467: cellfun ignores UniformOutput=false sometimes & needs doc update

Submitted by:  Markus Appel <mappel>
Submitted on:  Mon 04 Nov 2013 09:46:23 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Jordi Gutiérrez Hermoso <jordigh>
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 10 Nov 2013 02:57:33 AM UTC, comment #4:

I have pushed a couple of fixes:

http://hg.savannah.gnu.org/hgweb/octave/rev/5401637c3fa7
http://hg.savannah.gnu.org/hgweb/octave/rev/38b726ed04c9

These should be part of the upcoming Octave release in a couple of weeks. Closing report.

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Wed 06 Nov 2013 08:05:56 PM UTC, comment #3:

Thanks for the diagnosis. I guess I broke this... I'll work on fixing it.

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Tue 05 Nov 2013 01:39:23 AM UTC, comment #2:

Confirmed. See cellfun.cc line 491:

http://hg.savannah.gnu.org/hgweb/octave/file/45e325002810/libinterp/corefcn/cellfun.cc#l491

The function attempts to call internal versions of certain named functions that it recognizes, even if they were passed in as a function handle instead of a string. This code path doesn't appear to respect the UniformOutput property.

Mike Miller <mtmiller>
Project Administrator
Mon 04 Nov 2013 05:06:13 PM UTC, comment #1:

Update:

I was a bit too fast jumping too conclusions with "isclass", the documentation actually shows that a second argument is necessary which makes it work as expected.

Looking into Matlab R2012b I saw that calls of the form cellfun('isempty',...) are supported for backwards compatibility only and do not accept the "UniformOutput" property at all.

Here is another example of "UniformOutput" failing, this time with function handles:

Markus Appel <mappel>
Mon 04 Nov 2013 09:46:23 AM UTC, original submission:

cellfun presently has some issues:

(1)
For (most?) functions explicitly named in the documentation, UniformOutput=false is ignored:

(2)
The documented function 'isclass' does not exist (has it been renamed to 'isobject'?)

(3)
Personally, I find the documentation on "character string arguments" quite confusing:

The part about "must return a string value" does not seem to be required, but the following form seems to be obsolete anyway:

Cheers,
Markus

Markus Appel <mappel>

 

(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 jordigh (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by mappel (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 10 Nov 2013 02:57:33 AM UTCjordighStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 06 Nov 2013 08:05:56 PM UTCjordighAssigned toNone=>jordigh
    Tue 05 Nov 2013 01:39:23 AM UTCmtmillerStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1