Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MINOR] Remove exception in cast as IntArray
This commit removes the exception in cast as IntArray from DoubleArray. We encounter an issue in this conversion for large numbers of double values, that does not cast perfectly to the same double values when casting the integer values back to doubles. The script that reproduce the bug is: ``` k = ifdef($k, 5) paq = ifdef($paq, 1) X = round(rand(rows = 50, cols = 10, min=1, max=10)) y = X %*% rand(rows = ncol(X), cols = 1) w = lm(X = X, y = y) yhat = X %*% w ress = slicefinder(X = X, e = abs(y - yhat), k = k, maxL = 0, minSup = 1, alpha = 1, selFeat = TRUE, verbose = TRUE) print(toString(ress)) ``` A subsequent commits add a test case that ensure this bug does not happen again.
- Loading branch information