You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Mike Dusenberry (JIRA)" <ji...@apache.org> on 2016/05/10 17:30:13 UTC

[jira] [Commented] (SYSTEMML-676) Improve PyDML Slicing

    [ https://issues.apache.org/jira/browse/SYSTEMML-676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15278515#comment-15278515 ] 

Mike Dusenberry commented on SYSTEMML-676:
------------------------------------------

[~mboehm7]:

{quote}
just to provide some history here: at one point we supported implicit lower and upper bounds, but removed it because (1) it is invalid R (1:3 is a shorthand for sequence, which is undefined with missing lower/upper bounds), and (2) because we cannot compile valid execution plans in case of unknown input size. However, meanwhile (with dynamic recompilation), the latter problem can be mitigated with additional runtime changes (e.g., for forced CP execution w/o recompile).
{quote}

Great to see some of the history.  W.r.t. (1), definitely understandable for DML, but luckily we don't have to worry about it for PyDML, as {{a:b}} is only used in the context of slicing.  As for (2), is it possible to just inject, say, {{nrow(X)}} at the parser level for the implicit slicing {{X\[2:,]}}, which would be equivalent to {{X\[2:nrow(X),]}}?

> Improve PyDML Slicing
> ---------------------
>
>                 Key: SYSTEMML-676
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-676
>             Project: SystemML
>          Issue Type: Improvement
>            Reporter: Mike Dusenberry
>
> Currently, slicing correctly uses inclusive lower and exclusive upper bounds. However, a really useful piece of slicing syntax we are currently missing from PyDML is the ability to have implicit lower or upper bounds, i.e., {{X[ :3, ]}} should return all rows up to (but not including) 3. This means that the implicit lower bound is 0. Similarly, {{X[ 2:, ]}} should return all rows starting at row 2 (0-based), which implies that the upper bound is equal to the number of rows of {{X}}.
> We should update the grammar to allow these cases, row both row and column slicing.  More generally, {{X[ :,: ]}}, should also be valid, regardless if it is useful.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)