Repository: systemml Updated Branches: refs/heads/master d90073d80 -> d47414ed0
[SYSTEMML-1980] Fix matrix value types after as.matrix casts This patch fixes a minor issue of value type inference for as.matrix casts. Specifically, matrices should always be assigned the value type double independent of the input value type. Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/78cc94a1 Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/78cc94a1 Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/78cc94a1 Branch: refs/heads/master Commit: 78cc94a1e91102309d3e8834409f880cc0900f58 Parents: d90073d Author: Matthias Boehm <[email protected]> Authored: Thu Nov 30 15:30:06 2017 -0800 Committer: Matthias Boehm <[email protected]> Committed: Thu Nov 30 15:30:06 2017 -0800 ---------------------------------------------------------------------- .../java/org/apache/sysml/parser/BuiltinFunctionExpression.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/78cc94a1/src/main/java/org/apache/sysml/parser/BuiltinFunctionExpression.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/parser/BuiltinFunctionExpression.java b/src/main/java/org/apache/sysml/parser/BuiltinFunctionExpression.java index 566ddf8..db1b638 100644 --- a/src/main/java/org/apache/sysml/parser/BuiltinFunctionExpression.java +++ b/src/main/java/org/apache/sysml/parser/BuiltinFunctionExpression.java @@ -502,7 +502,7 @@ public class BuiltinFunctionExpression extends DataIdentifier if( getFirstExpr().getOutput().getDataType()==DataType.SCALAR ) output.setDimensions(1, 1); //correction scalars output.setBlockDimensions(id.getRowsInBlock(), id.getColumnsInBlock()); - output.setValueType(id.getValueType()); + output.setValueType(ValueType.DOUBLE); //matrices always in double break; case CAST_AS_FRAME: checkNumParameters(1);
