Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
i = i + 1
func.free_parameters["value_%d" % i].value = initial_value
func.free_parameters["value_%d" % i].min_value = parameter_min
func.free_parameters["value_%d" % i].max_value = parameter_max
func.parameters["upper_bound_%d" % i].value = interval[1]
func.parameters["lower_bound_%d" % i].value = interval[0]
else:
# For 1-D intervals, just create a sum of delta functions
func = DiracDelta()
for i in range(n_intervals - 1):
func += DiracDelta()
# Set up the values
for i, interval in enumerate(intervals):
i = i + 1
func.free_parameters["value_%d" % i].value = initial_value
func.free_parameters["value_%d" % i].min_value = parameter_min
func.free_parameters["value_%d" % i].max_value = parameter_max
func.parameters["zero_point_%d" % i].value = interval
func.free_parameters["value_%d" % i].min_value = parameter_min
func.free_parameters["value_%d" % i].max_value = parameter_max
func.parameters["upper_bound_%d" % i].value = interval[1]
func.parameters["lower_bound_%d" % i].value = interval[0]
else:
# For 1-D intervals, just create a sum of delta functions
func = DiracDelta()
for i in range(n_intervals - 1):
func += DiracDelta()
# Set up the values
for i, interval in enumerate(intervals):
i = i + 1
func.free_parameters["value_%d" % i].value = initial_value
func.free_parameters["value_%d" % i].min_value = parameter_min
func.free_parameters["value_%d" % i].max_value = parameter_max
func.parameters["zero_point_%d" % i].value = interval
return func