Skip to content

Commit

Permalink
make __call__ a one-liner
Browse files Browse the repository at this point in the history
Co-Authored-By: Anton Akhmerov <[email protected]>
  • Loading branch information
basnijholt and akhmerov committed Apr 16, 2020
1 parent 093f148 commit ccdbe76
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions adaptive/learner/sequence_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ def __init__(self, function, sequence):
self.sequence = sequence

def __call__(self, index, *args, **kwargs):
point = self.sequence[index]
return self.function(point, *args, **kwargs)
return self.function(self.sequence[index], *args, **kwargs)

def __getstate__(self):
return self.function, self.sequence
Expand Down

0 comments on commit ccdbe76

Please sign in to comment.