You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Matthias Boehm (JIRA)" <ji...@apache.org> on 2017/11/02 03:56:00 UTC

[jira] [Created] (SYSTEMML-1981) Wrong value type propagation in function w/ auto cast of inputs

Matthias Boehm created SYSTEMML-1981:
----------------------------------------

             Summary: Wrong value type propagation in function w/ auto cast of inputs
                 Key: SYSTEMML-1981
                 URL: https://issues.apache.org/jira/browse/SYSTEMML-1981
             Project: SystemML
          Issue Type: Bug
            Reporter: Matthias Boehm
            Priority: Minor


The following code returns the output as {{DOUBLE}} although it's supposed to return {{INT}}.

{code}
foo = function(Matrix[double] X, int input) return (int out) {
  out = input;
  for(i in 1:2) {
    tmp = sum(X);
    out = input + as.integer(tmp);
  }
}

X = seq(1,100);
xmax = max(X); #input of type double
y = foo(X, xmax); #auto casting
print(y);
{code}

This is a minor issue but creates warnings that are annoying if such a function is called very often:
{{code}}
17/11/01 20:49:00 WARN controlprogram.ProgramBlock: Function output out has wrong value type: DOUBLE.
{{code}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)