> On 16 Aug 2019, at 16:06, Gilles Sadowski <gillese...@gmail.com> wrote:
> 
> Hello.
> 
> Le jeu. 15 août 2019 à 11:33, akash srivastava <akashsp...@gmail.com> a écrit 
> :
>> 
>> Here is the link for the related bug:
>> https://issues.apache.org/jira/browse/MATH-1495
>> 
>> I have suggested two possible fixes when NaturalRanking#rank() is called on
>> an array of all NaNs:
>> 1) throwing an IllegalArgumentException
>> 2) Returning an empty array
>> 
>> I want to create a pull request regarding it, which fix do you suggest I
>> should go for?
> 
> There are rationale for each.  An exception would catch a programming bug 
> early.
> But returning an empty array would allow concise code when such a case is not 
> a
> bug.
> WDYT?  Are there use-cases?

IIUC this is for the case when the NaNStrategy is REMOVED. So the result should 
match what happens when you call NaturalRanking.rank() with an empty array. Is 
that an empty array result or an exception?

> 
> Gilles
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to