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
The following commit(s) were added to refs/heads/master by this push:
new 2a20334b8 Replace qualified name with import
2a20334b8 is described below
commit 2a20334b85b9dc60ea568db20d38ea101fa1d182
Author: Alex Herbert <[email protected]>
AuthorDate: Thu Sep 18 10:55:08 2025 +0100
Replace qualified name with import
---
.../org/apache/commons/math4/legacy/stat/correlation/Covariance.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/correlation/Covariance.java
b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/correlation/Covariance.java
index 5caf26ef6..7f831b691 100644
---
a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/correlation/Covariance.java
+++
b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/stat/correlation/Covariance.java
@@ -21,6 +21,7 @@ import
org.apache.commons.math4.legacy.exception.NotStrictlyPositiveException;
import org.apache.commons.math4.legacy.exception.util.LocalizedFormats;
import org.apache.commons.math4.legacy.linear.BlockRealMatrix;
import org.apache.commons.math4.legacy.linear.RealMatrix;
+import org.apache.commons.statistics.descriptive.Mean;
/**
* Computes covariances for pairs of arrays or columns of a matrix.
@@ -240,8 +241,8 @@ public class Covariance {
throw new MathIllegalArgumentException(
LocalizedFormats.INSUFFICIENT_OBSERVED_POINTS_IN_SAMPLE,
length, 2);
} else {
- double xMean =
org.apache.commons.statistics.descriptive.Mean.of(xArray).getAsDouble();
- double yMean =
org.apache.commons.statistics.descriptive.Mean.of(yArray).getAsDouble();
+ double xMean = Mean.of(xArray).getAsDouble();
+ double yMean = Mean.of(yArray).getAsDouble();
for (int i = 0; i < length; i++) {
double xDev = xArray[i] - xMean;
double yDev = yArray[i] - yMean;