MCPcopy Create free account
hub / github.com/DEAP/deap / tupleize

Function tupleize

examples/bbob.py:41–47  ·  view source on GitHub ↗

A decorator that tuple-ize the result of a function. This is useful when the evaluation function returns a single value.

(func)

Source from the content-addressed store, hash-verified

39 individual[i] = random.gauss(mu_i, sigma)
40
41def tupleize(func):
42 """A decorator that tuple-ize the result of a function. This is useful
43 when the evaluation function returns a single value.
44 """
45 def wrapper(*args, **kargs):
46 return func(*args, **kargs),
47 return wrapper
48
49def main(func, dim, maxfuncevals, ftarget=None):
50 toolbox = base.Toolbox()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…