Skip to content

Commit

Permalink
Make spotpy more robust against truncation of data #269
Browse files Browse the repository at this point in the history
  • Loading branch information
thouska committed Sep 9, 2021
1 parent 118600d commit 92c3aad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spotpy/algorithms/_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class _algorithm(object):
If the objectivefunction value is higher, the results are saved in the database. If not they are ignored (saves storage).
db_precision:np.float type
set np.float16, np.float32 or np.float64 for rounding of floats in the output database
Default is np.float16
Default is np.float32
sim_timeout: float, int or None, default: None
the defined model given in the spot_setup class can be controlled to break after 'sim_timeout' seconds if
sim_timeout is not None.
Expand All @@ -207,7 +207,7 @@ class _algorithm(object):

def __init__(self, spot_setup, dbname=None, dbformat=None, dbinit=True,
dbappend=False, parallel='seq', save_sim=True, breakpoint=None,
backup_every_rep=100, save_threshold=-np.inf, db_precision=np.float16,
backup_every_rep=100, save_threshold=-np.inf, db_precision=np.float32,
sim_timeout=None, random_state=None, optimization_direction='grid', algorithm_name=''):

# Initialize the user defined setup class
Expand Down
2 changes: 1 addition & 1 deletion spotpy/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ def generate(parameters):
is given as a structured array in the format the parameters function of a setup expects
:parameters: A sequence of parameter objects
"""
dtype = [('random', '<f8'), ('name', '|U30'),
dtype = [('random', '<f8'), ('name', '|U100'),
('step', '<f8'), ('optguess', '<f8'),
('minbound', '<f8'), ('maxbound', '<f8'), ('as_int', 'bool')]

Expand Down

0 comments on commit 92c3aad

Please sign in to comment.