def floatify(scalar):
    """
    Useful to make float from strings compatible from fortran

    Args:
       scalar (str, float): When string representing a float that might be
         given in fortran notation, otherwise it might be a floating point
    Returns:
       float. The value associated to scalar as a floating point number

    Example:
       >>> # this would be the same with "1.e-4" or with 0.0001
       >>> floatify('1.d-4')
       1.e-4

    """
    if isinstance(scalar, str):
        return float(scalar.replace('d', 'e').replace('D', 'E'))
    else:
        return scalar