Whoops, missed one

This commit is contained in:
Adam Nelson 2016-11-08 18:52:39 -05:00
parent cdae8f70f7
commit deb4de90a2

View file

@ -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