You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Felix Schüler (JIRA)" <ji...@apache.org> on 2017/02/10 00:44:41 UTC
[jira] [Created] (SYSTEMML-1241) Matrix initialization with diag()
not possible
Felix Schüler created SYSTEMML-1241:
---------------------------------------
Summary: Matrix initialization with diag() not possible
Key: SYSTEMML-1241
URL: https://issues.apache.org/jira/browse/SYSTEMML-1241
Project: SystemML
Issue Type: Bug
Reporter: Felix Schüler
Priority: Minor
The documentation for diag() states that
{quote}
Create diagonal matrix from (n x 1) or (1 x n) matrix, or take diagonal from square matrix
{quote}
This snippet
{code}
mlctx.execute(dml("D = diag(matrix(1.0, rows=1, cols=2))"))
{code}
fails with
{code}
Name: org.apache.sysml.api.mlcontext.MLContextException
Message: Exception when executing script
StackTrace: at org.apache.sysml.api.mlcontext.MLContext.execute(MLContext.java:307)
at org.apache.sysml.api.mlcontext.MLContext.execute(MLContext.java:276)
... 48 elided
Caused by: org.apache.sysml.api.mlcontext.MLContextException: Exception occurred while validating script
at org.apache.sysml.api.mlcontext.ScriptExecutor.validateScript(ScriptExecutor.java:553)
at org.apache.sysml.api.mlcontext.ScriptExecutor.execute(ScriptExecutor.java:307)
at org.apache.sysml.api.mlcontext.MLContext.execute(MLContext.java:299)
... 49 more
Caused by: org.apache.sysml.parser.LanguageException: Invalid Parameters : ERROR: null -- line 1, column 0 -- Invoking diag on matrix with dimensions (1,2) in DIAG(RAND(,lambda=1.0,min=1.0,pdf=uniform,seed=-1,max=1.0,sparsity=1.0,rows=1,cols=2 ))
at org.apache.sysml.parser.Expression.raiseValidateError(Expression.java:556)
at org.apache.sysml.parser.BuiltinFunctionExpression.validateExpression(BuiltinFunctionExpression.java:630)
at org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:567)
at org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:140)
at org.apache.sysml.api.mlcontext.ScriptExecutor.validateScript(ScriptExecutor.java:551)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)