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

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

[Octave-bug-tracker] [bug #65927] movfun: output shape incorrect for dim


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #65927] movfun: output shape incorrect for dim>2
Date: Sun, 30 Jun 2024 13:10:49 -0400 (EDT)

Follow-up Comment #7, bug #65927 (group octave):

IIUC, the new test uncovered an issue that is present since a few months. I
guess it is caused by this change (that is still on the default branch only):
https://hg.savannah.gnu.org/hgweb/octave/rev/4df9460ab8a9

One of the input parser validation functions needs to be able to catch the
value of `x` of its scope:

    parser.addParamValue ("dim", [], ...
      @(d) isempty (d) || (isscalar (d) && isindex (d, ndims (x))));


However, the anonymous function is only initialized once on the first call of
"movfun". Subsequent calls (with potentially differently shaped `x`) re-use
the inputParser object from before.
That causes the error that is uncovered by the new test.

CC'ing arb as the author of that change.

@arb: Should we revert that change? Is it possible to update the validation
function of an existing inputParser object?
I guess that change was done for performance reasons. How bad was it before
that change?



    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature


reply via email to

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