diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-02-06 15:05:05 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-02-06 15:05:05 +0100 |
commit | a23fc5e8d4e9ef0f737041f6d4f2ebc50b38c40b (patch) | |
tree | a22a9aec262a126aa3ecd3e60e93c8166004527d /vespajlib/src/main/java/com/yahoo/tensor/functions | |
parent | 53041a25e69fbda934f8e7645ecf8220edfbea78 (diff) |
Type check all expressions
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/functions')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/tensor/functions/Reduce.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/functions/Reduce.java b/vespajlib/src/main/java/com/yahoo/tensor/functions/Reduce.java index 76a938b9fe2..416b74e7f94 100644 --- a/vespajlib/src/main/java/com/yahoo/tensor/functions/Reduce.java +++ b/vespajlib/src/main/java/com/yahoo/tensor/functions/Reduce.java @@ -106,6 +106,7 @@ public class Reduce extends PrimitiveTensorFunction { } private TensorType type(TensorType argumentType) { + if (dimensions.isEmpty()) return TensorType.empty; // means reduce all TensorType.Builder builder = new TensorType.Builder(); for (TensorType.Dimension dimension : argumentType.dimensions()) if ( ! dimensions.contains(dimension.name())) // keep |