octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #66642] cellfun & arrayfun return zero values


From: Fernando
Subject: [Octave-bug-tracker] [bug #66642] cellfun & arrayfun return zero values if function returns fewer outputs than expected
Date: Wed, 8 Jan 2025 15:21:39 -0500 (EST)

Follow-up Comment #6, bug #66642 (group octave):

There's also another case solved by the patch. It's the following:


octave:> function [r]=f(x); if(x>0) r=x ;end; end
octave:> a=f(3)
      a = 3
octave:> a=f(-3)
error: value on right hand side of assignment is undefined
octave:> % everything's fine up to now
octave:> a=cellfun(@f,{1,-2,3},"uniformoutput",false)
      a =
      {
        [1,1] = 1
        [1,2] =

error: octave_base_value::print (): wrong type argument '<unknown type>'


and you end up with a cell array (a) with an undefined element.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66642>

_______________________________________________
Mensaje enviado vía Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]