uwg.utilities module

Collection of useful methods.

uwg.utilities.float_in_range(value, mi=-inf, ma=inf, input_name='')[source]

Check a float value to be between minimum and maximum.

uwg.utilities.float_in_range_excl(value, mi=-inf, ma=inf, input_name='')[source]

Check a float value to be greater than minimum and less than maximum.

uwg.utilities.float_in_range_excl_incl(value, mi=-inf, ma=inf, input_name='')[source]

Check a float value to be greater than minimum and less than/equal to maximum.

uwg.utilities.float_in_range_incl_excl(value, mi=-inf, ma=inf, input_name='')[source]

Check a float value to be greater than/equal to minimum and less than maximum.

uwg.utilities.float_positive(value, input_name='')[source]

Check a float value to be positive.

uwg.utilities.int_in_range(value, mi=-inf, ma=inf, input_name='')[source]

Check an integer value to be between minimum and maximum.

uwg.utilities.int_positive(value, input_name='')[source]

Check if an integer value is positive.

uwg.utilities.is_near_zero(num, eps=1e-10)[source]
uwg.utilities.read_csv(file_path)[source]

Open csv file and read.

Parameters:

file_path – Text string for file path.

Returns:

List of file lines as str type.

uwg.utilities.str2fl(x)[source]

Recurses through lists and converts lists of string to float

Parameters:

x – string or list of strings