Skip to content

Commit

Permalink
Fix docstrings for sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenfmann committed Dec 19, 2024
1 parent 6368234 commit 3288b63
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 29 deletions.
2 changes: 1 addition & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Evolve objects ``evolve.py``
:members:

Game objects ``games.py``
----------------------------------------
-------------------------

.. automodule:: games
:members:
Expand Down
2 changes: 0 additions & 2 deletions evoke/examples/godfreysmith2013communication.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
"""
Evoke library examples from:
Godfrey-Smith, P., & Martínez, M. (2013). Communication and Common Interest.
Expand Down
2 changes: 0 additions & 2 deletions evoke/examples/skyrms2010signals.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
"""
Evoke library examples from:
Skyrms, B. (2010). Signals: Evolution, Learning, and Information. Oxford University Press.
Expand Down
43 changes: 19 additions & 24 deletions evoke/src/calculate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ def one_basin_discrete(game, trials, times):
Parameters
----------
game : One of the Evoke game classes
Game to be solved
game : One of the Evoke game classes.
Game to be solved.
trials : int
Number of starting points to be used
times : evolve.Times object
Number of starting points to be used.
times : evolve.Times object.
"""

pool = multiprocessing.Pool(None)
remain = trials
# nash = s.Nash(game)
Expand All @@ -44,12 +45,12 @@ def one_basin_discrete_aux(triple):
----------
triple : tuple
A tuple with the following elements:
0 : int
The index of the trial
1 : One of the Evoke game classes
The game to be solved
2 : evolve.Times object
int -- The index of the trial
One of the Evoke game classes -- The game to be solved
evolve.Times object
"""

np.random.seed()
print("trial {}".format(triple[0]))
game = triple[1]
Expand Down Expand Up @@ -91,11 +92,9 @@ def one_basin_aux_mixed(triple, print_trials=True):
----------
triple : tuple
A tuple with the following elements:
0 : int
The index of the trial
1 : One of the Evoke game classes
The game to be solved
2 : evolve.Times object
int -- The index of the trial
One of the Evoke game classes -- The game to be solved
evolve.Times object
print_trials : bool, optional
If True, print the trial number
"""
Expand Down Expand Up @@ -123,11 +122,9 @@ def one_basin_aux(triple):
----------
triple : tuple
A tuple with the following elements:
0 : int
The index of the trial
1 : One of the Evoke game classes
The game to be solved
2 : evolve.Times object
int -- The index of the trial
One of the Evoke game classes -- The game to be solved
evolve.Times object
"""
np.random.seed()
print("trial {}".format(triple[0]))
Expand All @@ -145,11 +142,9 @@ def one_basin_ode_aux(triple):
----------
triple : tuple
A tuple with the following elements:
0 : int
The index of the trial
1 : One of the Evoke game classes
The game to be solved
2 : evolve.Times object
int -- The index of the trial
One of the Evoke game classes -- The game to be solved
evolve.Times object
"""
np.random.seed()
# print("trial {}".format(triple[0]))
Expand Down

0 comments on commit 3288b63

Please sign in to comment.