simpeg.utils.validate_float#

simpeg.utils.validate_float(property_name, var, min_val=-inf, max_val=inf, inclusive_min=True, inclusive_max=True)[source]#

Validate float property

Parameters:
property_namestr

The name of the property being set

varnumber

The input variable which will be cast to a float

min_val, max_valint or float, optional

Minimum/Maximum value

inclusive_min, inclusive_maxbool, optional

Whether the minimum and maximum values are inclusive.

Returns:
float

Returns the input variable as a float once validated

Notes

The input is first attempted ot be cast to a float.

Galleries and Tutorials using simpeg.utils.validate_float#

Straight Ray with Volume Data Misfit Term

Straight Ray with Volume Data Misfit Term