[deap] push by marc.andre.gardner - Modify gp.gen* functions docstring to comply to the new behavior (type... on 2014-04-30 20:17 GMT

1 view
Skip to first unread message

de...@googlecode.com

unread,
Apr 30, 2014, 4:18:14 PM4/30/14
to deap-de...@googlegroups.com
Revision: 851e9783528b
Branch: dev
Author: marc_andre
Date: Wed Apr 30 20:21:56 2014 UTC
Log: Modify gp.gen* functions docstring to comply to the new behavior
(type_=None means pset.ret)
http://code.google.com/p/deap/source/detail?r=851e9783528b

Modified:
/deap/gp.py

=======================================
--- /deap/gp.py Wed Apr 30 20:00:27 2014 UTC
+++ /deap/gp.py Wed Apr 30 20:21:56 2014 UTC
@@ -495,7 +495,8 @@
:param min_: Minimum height of the produced trees.
:param max_: Maximum Height of the produced trees.
:param type_: The type that should return the tree when called, when
- :obj:`None` (default) no return type is enforced.
+ :obj:`None` (default) the type of :pset: (pset.ret)
+ is assumed.
:returns: A full tree with all leaves at the same depth.
"""
def condition(height, depth):
@@ -511,7 +512,8 @@
:param min_: Minimum height of the produced trees.
:param max_: Maximum Height of the produced trees.
:param type_: The type that should return the tree when called, when
- :obj:`None` (default) no return type is enforced.
+ :obj:`None` (default) the type of :pset: (pset.ret)
+ is assumed.
:returns: A grown tree with leaves at possibly different depths.
"""
def condition(height, depth):
@@ -531,7 +533,8 @@
:param min_: Minimum height of the produced trees.
:param max_: Maximum Height of the produced trees.
:param type_: The type that should return the tree when called, when
- :obj:`None` (default) no return type is enforced.
+ :obj:`None` (default) the type of :pset: (pset.ret)
+ is assumed.
:returns: Either, a full or a grown tree.
"""
method = random.choice((genGrow, genFull))
@@ -558,7 +561,8 @@
the height of the tree to build and the current
depth in the tree.
:param type_: The type that should return the tree when called, when
- :obj:`None` (default) no return type is enforced.
+ :obj:`None` (default) the type of :pset: (pset.ret)
+ is assumed.
:returns: A grown tree with leaves at possibly different depths
dependending on the condition function.
"""
Reply all
Reply to author
Forward
0 new messages