You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2022/10/13 16:53:00 UTC

[commons-math] 02/07: Remove unecessary cast to double

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-math.git

commit 1df6c402c16770b59cc4e257c86d121cd1cf1c86
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Oct 13 17:30:14 2022 +0100

    Remove unecessary cast to double
---
 .../apache/commons/math4/legacy/distribution/EmpiricalDistribution.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/distribution/EmpiricalDistribution.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/distribution/EmpiricalDistribution.java
index f7e2fe6be..5602d3638 100644
--- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/distribution/EmpiricalDistribution.java
+++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/distribution/EmpiricalDistribution.java
@@ -138,7 +138,7 @@ public final class EmpiricalDistribution extends AbstractRealDistribution
 
         // Assign upper bounds based on bin counts.
         upperBounds = new double[binCount];
-        final double n = (double) sampleStats.getN();
+        final double n = sampleStats.getN();
         upperBounds[0] = binStats.get(0).getN() / n;
         for (int i = 1; i < binCount - 1; i++) {
             upperBounds[i] = upperBounds[i - 1] + binStats.get(i).getN() / n;