Skip to content

Commit

Permalink
Add wrap decorator.
Browse files Browse the repository at this point in the history
  • Loading branch information
PytLab committed Jan 31, 2018
1 parent eb39ac7 commit 9b27685
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gaft/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ def minimize(self, fn):
'''
A decorator for minimizing the fitness function.
'''
@wraps(fn)
def _minimize(indv):
return -fn(indv)
return _minimize
Expand Down

0 comments on commit 9b27685

Please sign in to comment.