Skip to content

Commit

Permalink
edited docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianlacey committed Jan 12, 2019
1 parent b6c95af commit 61c4a9d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions gastop/encoders.py
Expand Up @@ -50,6 +50,11 @@ def numpy_decoder(dct):
''' Decodes JSON files to config and population.
If the object is has '__numpy__' metadata, converts it to a numpy array.
Args:
dct (dict): Dictionary in JSON file.
Returns:
dct (dict): Dictionary with numpy arrays decoded.
'''
if '__numpy__' in dct:
return np.array(dct['data'])
Expand Down
4 changes: 2 additions & 2 deletions gastop/genalg.py
Expand Up @@ -218,7 +218,7 @@ def save_state(self, dest_config='config.json',
doesn't exist, creates it.
Returns:
Nothing
None
'''
# Save rng_seed for reloading
self.config['random_params']['rng_seed'] = np.random.get_state()
Expand Down Expand Up @@ -246,7 +246,7 @@ def load_state(dest_config='config.json',
dest_pop (string): Path to population data file.
Returns:
GenAlg Object
ga (GenAlg object)
'''
# Load config data
with open(dest_config, 'r') as f:
Expand Down
2 changes: 1 addition & 1 deletion gastop/selector.py
Expand Up @@ -27,7 +27,7 @@ def __init__(self, sel_params):
- ``'method_params'`` *(dict)*: Dictionary of parameters required by chosen method.
Returns:
Selector callable object
selector (Selector object)
"""
self.sel_params = sel_params
Expand Down
2 changes: 1 addition & 1 deletion gastop/utilities.py
Expand Up @@ -298,7 +298,7 @@ def save_progress_history(progress_history, path_progress_history='progress_hist
doesn't exist, creates it.
Returns:
Nothing
None
'''
# Save progress_history data
with open(path_progress_history, 'w') as f:
Expand Down

0 comments on commit 61c4a9d

Please sign in to comment.