Commit f4847383 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Ioannis Papagiannopoulos

RandomNumberGenerator to be able to receive null values by GUI

parent 3845955a
......@@ -56,6 +56,10 @@ class RandomNumberGenerator(object):
self.distribution=distribution
self.distributionType = distribution.keys()[0]
parameters=distribution[self.distributionType]
# if a parameter is passed as None or empty string set it to 0
for key in parameters:
if parameters[key] in [None,'']:
parameters[key]=0.0
self.mean = float(parameters.get('mean', 0))
self.stdev = float(parameters.get('stdev', 0))
self.min = float(parameters.get('min',0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment