From deb4de90a25928ff59985e12f5006dc172708dbf Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Tue, 8 Nov 2016 18:52:39 -0500 Subject: [PATCH] Whoops, missed one --- openmc/data/function.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openmc/data/function.py b/openmc/data/function.py index 4a1f9d7a38..b1cdb09de0 100644 --- a/openmc/data/function.py +++ b/openmc/data/function.py @@ -427,9 +427,9 @@ class Combination(EqualityMixin): self.operations = operations def __call__(self, x): - ans = np.zeros_like(x) - for op, func in zip(self.operations, self.functions): - ans = op(ans, func(x)) + ans = self.functions[0](x) + for i, operation in enumerate(self.operations): + ans = operation(ans, self.functions[i + 1](x)) return ans @property @@ -448,7 +448,7 @@ class Combination(EqualityMixin): @operations.setter def operations(self, operations): cv.check_type('operations', operations, Iterable, np.ufunc) - length = len(self.functions) + length = len(self.functions) - 1 cv.check_length('operations', operations, length, length_max=length) self._operations = operations