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

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

[Octave-bug-tracker] [bug #59641] prctile function errors when specifyin


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #59641] prctile function errors when specifying higher order singleton dimensions
Date: Tue, 8 Dec 2020 23:25:19 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36

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

calling quantile and prctile on a vector either does as expected when
operating on the vector dimension (gives you the value when dim = vector dim)
or returns the vector when operating in the other dimension, as any value of
quantile and percentile is just the single value passed.  the same behavior
should happen for any singleton dimension.

with the normal call being:


>> prctile(1:5, 2)
ans = 3


there's no reason for a different output between calling:


>> prctile(1:5, 1)
ans = 
     1     2     3     4     5 

and 

>> prctile(1:5, 3)
ans = 
     1     2     3     4     5 

or 

>> prctile(1:5, 9999)
ans = 
     1     2     3     4     5 


that's also consistent behavior that carries forward in many of matlab's
functions that build on prctile and quantile (iqr and normalize in particular.
was working on iqr compatibility when i ran into this one)

before I saw your comment I had already worked up a patch for these. will
attach as next comment and can see if it fits. 

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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