Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.junit.Test;
import org.apache.sysds.api.DMLScript;
import org.apache.sysds.common.Types.ExecMode;
import org.apache.sysds.runtime.matrix.data.MatrixValue;
import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex;
import org.apache.sysds.runtime.meta.MatrixCharacteristics;
import org.apache.sysds.test.AutomatedTestBase;
Expand Down Expand Up @@ -110,8 +109,9 @@ private void runTestCholesky( int rows, int cols, ExecMode rt) {
//run tests and compare results
runTest(true, false, null, -1);
HashMap<CellIndex, Double> dmlOut = readDMLMatrixFromOutputDir("D");
MatrixValue.CellIndex index = dmlOut.keySet().iterator().next();
double d = dmlOut.get(index);
// D is the 1x1 residual sum(A-B); an exact 0.0 result is not written to
// the sparse output, so an empty map corresponds to a perfect residual.
double d = dmlOut.isEmpty() ? 0.0 : dmlOut.values().iterator().next();
Assert.assertEquals(0, d, 1e-5);
}
finally {
Expand Down
Loading