Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-zobel committed Mar 9, 2024
1 parent aa20f3b commit 1f36ce7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>net.sourceforge.streamsupport</groupId>
<artifactId>jamu</artifactId>
<packaging>jar</packaging>
<version>1.4.2</version>
<version>1.4.3-SNAPSHOT</version>
<name>JAMU</name>
<description>Java Matrix Utilities built on top of Intel MKL</description>
<url>https://github.com/stefan-zobel/JAMU/</url>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/net/jamu/matrix/Matrices.java
Original file line number Diff line number Diff line change
Expand Up @@ -3510,7 +3510,7 @@ public static ComplexMatrixF sumRows(ComplexMatrixF A) {
* @since 1.4.2
*/
public static MatrixD rowsAverage(MatrixD A) {
return sumRows(A).scaleInplace(A.numRows());
return sumRows(A).scaleInplace(1.0 / A.numRows());
}

/**
Expand All @@ -3524,7 +3524,7 @@ public static MatrixD rowsAverage(MatrixD A) {
* @since 1.4.2
*/
public static MatrixF rowsAverage(MatrixF A) {
return sumRows(A).scaleInplace(A.numRows());
return sumRows(A).scaleInplace(1.0f / A.numRows());
}

/**
Expand Down Expand Up @@ -3656,7 +3656,7 @@ public static ComplexMatrixF sumColumns(ComplexMatrixF A) {
* @since 1.4.2
*/
public static MatrixD colsAverage(MatrixD A) {
return sumColumns(A).scaleInplace(A.numColumns());
return sumColumns(A).scaleInplace(1.0 / A.numColumns());
}

/**
Expand All @@ -3670,7 +3670,7 @@ public static MatrixD colsAverage(MatrixD A) {
* @since 1.4.2
*/
public static MatrixF colsAverage(MatrixF A) {
return sumColumns(A).scaleInplace(A.numColumns());
return sumColumns(A).scaleInplace(1.0f / A.numColumns());
}

private static boolean checkApproxEqualArgs(MatrixDimensions A, MatrixDimensions B, double relTol, double absTol) {
Expand Down

0 comments on commit 1f36ce7

Please sign in to comment.