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

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

[Octave-bug-tracker] [bug #59022] [octave forge] (image) test failures i


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #59022] [octave forge] (image) test failures in blockproc.m under Octave 6.0.90
Date: Fri, 28 Aug 2020 03:50:05 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #8, bug #59022 (project octave):

Matlab returns the following:


>> a = inline('any(x(:))', 'x');
>> class(a)
ans =

    'inline'


so I will guess that the new return value in Octave is Matlab compatible and
correct. And while the use of `inline` is not recommended, it is unlikely to
ever be removed since it has been around for a very long time and removing it
would break too much old code.

I'm with Hartmut in that we should probably just "stick to the "dirty" way
with comparing class name strings". Something like this:


  if (! isa (fun,"function_handle")
      && ! isa (fun,"inline function")
      && ! isa (fun,"inline")
      && ! ischar (fun))
    error ("blockproc: invalid FUN parameter.");
  endif


By the way, Matlab's blockproc seems to not accept inline functions in the
first place, so I guess we could remove support for them if we want but I see
no reason to do so, and would argue that this is a bug in Matlab:


>> blockproc(eye(6),[2,2],inline('any(x(:))','x'))
Error using blockproc>parse_inputs (line 1019)
Invalid block function.  BLOCKPROC expects the user function, FUN, to be a
valid function handle.

Error in blockproc (line 226)
[source,fun,options] = parse_inputs(source,block_size,fun,args{:});


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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