Matthias Boehm created SYSTEMML-1008:
----------------------------------------

             Summary: RemoveEmtpy w/ selection vector and nnz=0 produces wrong 
output
                 Key: SYSTEMML-1008
                 URL: https://issues.apache.org/jira/browse/SYSTEMML-1008
             Project: SystemML
          Issue Type: Bug
            Reporter: Matthias Boehm
            Priority: Blocker


RemoveEmtpy with selection vector always has to respect the selection vector 
over the actual data. If the input matrix has no non-zero entries, however, we 
currently produce incorrect results of an empty row/column output vector.

For example, the following script should print {{nrow (A) = 10,  nrow (C) = 
10}} but prints {{nrow (A) = 10,  nrow (C) = 1}}.

{code}
A = matrix (0, rows = 10, cols = 1);
B = matrix (1, rows = 10, cols = 1);
C = removeEmpty (target = A, margin = "rows", select = B);
print ("nrow (A) = " + nrow (A) + ",  nrow (C) = " + nrow (C));
{code}

Thanks to [~ae2015] for catching this.



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

Reply via email to