[ 
https://issues.apache.org/jira/browse/MATH-1487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17017882#comment-17017882
 ] 

Chen Tao edited comment on MATH-1487 at 1/17/20 10:23 AM:
----------------------------------------------------------

I can not reproduce this bug both in 3.6.1 and development version, by this 
code:
{code:java}
@Testpublic void testCase() throws IOException
{ double[] alpha = readToDoubleArray("alpha.arr"); double[] beta = 
readToDoubleArray("beta.arr"); KolmogorovSmirnovTest kolmogorovSmirnovTest = 
new KolmogorovSmirnovTest(); kolmogorovSmirnovTest.kolmogorovSmirnovTest(alpha, 
beta); }
private double[] readToDoubleArray(final String filename) throws IOException
{ return Files.readAllLines(Paths.get("path", "to", "arrays", filename)) 
.stream() .mapToDouble(Double::parseDouble) .toArray(); }
{code}
More information should be provide.


was (Author: chentao106):
I can not reproduce this bug both in 3.6.1 and development version, by this 
code:

```java
 @Testpublic void testCase() throws IOException

{ double[] alpha = readToDoubleArray("alpha.arr"); double[] beta = 
readToDoubleArray("beta.arr"); KolmogorovSmirnovTest kolmogorovSmirnovTest = 
new KolmogorovSmirnovTest(); kolmogorovSmirnovTest.kolmogorovSmirnovTest(alpha, 
beta); }

private double[] readToDoubleArray(final String filename) throws IOException

{ return Files.readAllLines(Paths.get("path", "to", "arrays", filename)) 
.stream() .mapToDouble(Double::parseDouble) .toArray(); }

``` 

More information should be provide.

> MathInternalError - Kolmogorov Smirnov Test
> -------------------------------------------
>
>                 Key: MATH-1487
>                 URL: https://issues.apache.org/jira/browse/MATH-1487
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.6.1
>            Reporter: Paweł Lipiński
>            Priority: Critical
>         Attachments: alpha.arr, beta.arr
>
>
> Hi,
> I spotted a pesky bug in KolmogorovSmirnovTest class, in the method 
> kolmogorovSmirnovTest.
> In order to reproduce the error use arrays from attachments.
> Stacktrace:
> {noformat}
> org.apache.commons.math3.exception.MathInternalError: illegal state: internal 
> error, please fill a bug report at https://issues.apache.org/jira/browse/MATH
> at 
> org.apache.commons.math3.stat.inference.KolmogorovSmirnovTest.fixTies(KolmogorovSmirnovTest.java:1171)
>  at 
> org.apache.commons.math3.stat.inference.KolmogorovSmirnovTest.kolmogorovSmirnovTest(KolmogorovSmirnovTest.java:263)
>  at 
> org.apache.commons.math3.stat.inference.KolmogorovSmirnovTest.kolmogorovSmirnovTest(KolmogorovSmirnovTest.java:290)
> {noformat}
>   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to