[
https://issues.apache.org/jira/browse/SYSTEMML-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15636383#comment-15636383
]
Matthias Boehm commented on SYSTEMML-1081:
------------------------------------------
ok, this was an issue of constant propagation in the parser. Normally, these
mistakes are corrected by inter-procedural analysis but not here because there
was only the print and literals in the dag. PR 281 seemed to work because by
not propagating size information on left indexing, the input to ncol was
unknown and hence not subject to constant propagation. Anyway, i just delivered
the fix.
> Incorrect dimensions after left indexing operation
> --------------------------------------------------
>
> Key: SYSTEMML-1081
> URL: https://issues.apache.org/jira/browse/SYSTEMML-1081
> Project: SystemML
> Issue Type: Bug
> Reporter: Niketan Pansare
>
> To reproduce this bug, please try following DML script:
> z = matrix (0, rows = 2, cols = 5);
> z[2, 2] = 2.5;
> z[2, 3] = 5.0;
> z[2, 4] = 10.0;
> n = ncol(z);
> print ("ncol (z) = " + ncol (z) + ", but n = " + n);
> This prints ncol (z) = 5, but n = 1.
> This occurs due to the line:
> https://github.com/apache/incubator-systemml/blob/master/src/main/java/org/apache/sysml/parser/StatementBlock.java#L694
> [~reinwald] [~acs_s] [~mboehm7]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)