archetypal.utils.float_round

archetypal.utils.float_round(num, n)[source]

Makes sure a variable is a float and round it at “n” decimals

Parameters
  • num (str, int, float) – number we want to make sure is a float

  • n (int) – number of decimals

Returns

a float rounded number

Return type

num (float)