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

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

[Octave-bug-tracker] [bug #60482] hist() misses error for non-numeric in


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #60482] hist() misses error for non-numeric input
Date: Fri, 30 Apr 2021 13:07:10 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36

Follow-up Comment #3, bug #60482 (project octave):


looking through hist some more,  apparently hist itself just ignores anything
non-numeric for the purpose of the calculation.  if no outputs, it passes
everything else as parameters to bar for plotting.  If there are outputs (like
your example) then it never even looks at the options to consider throwing an
error.


>> freq = hist (data + 0, u)
freq =

   13    7    8    7   12   10   10    3   10   12

>> freq = hist (data + 0, u,'invalidparameter')
freq =

   13    7    8    7   12   10   10    3   10   12

>> hist (data + 0, u)
error: set: unknown property
error: called from
    __bar__>bars at line 349 column 10
    __bar__ at line 209 column 12
    bar at line 124 column 18
    hist at line 237 column 5


so, 1 - it seems there would have be a way for hist to check the 2nd or 3rd
input for 'validity', as they're the only two hist itself parses. 2 - it would
be useful for hist to actually name the property it has a problem with in the
error above.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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