Allow min to equal max for SPSA tuning
This is useful for the case where an array has known 0 values in it ; but you still want to tune the whole thing coherently
This commit is contained in:
1 parent
ef9d1ba68d
commit
ef96dd4dfc
1 file changed
+1
-1
@@ -252,7 +252,7 @@ def verify_spsa_inputs(errors, request, field):
|
|||||||
if data_type.strip() not in [ 'int', 'float' ]:
|
if data_type.strip() not in [ 'int', 'float' ]:
|
||||||
errors.append('Datatype must be int for float, for %s' % (name))
|
errors.append('Datatype must be int for float, for %s' % (name))
|
||||||
|
|
||||||
if float(minimum) >= float(maximum):
|
if float(minimum) > float(maximum):
|
||||||
errors.append('Max does not exceed Min, for %s' % (name))
|
errors.append('Max does not exceed Min, for %s' % (name))
|
||||||
|
|
||||||
if not (float(minimum) <= float(value) <= float(maximum)):
|
if not (float(minimum) <= float(value) <= float(maximum)):
|
||||||
|
|||||||
Reference in new issue
Block a user