def validate_float(s):
    """convert `s` to float or raise

    Returns
    -------
    s converted to a float: float

    Raises
    ------
    ValueError"""
    try:
        return float(s)
    except (ValueError, TypeError):
        raise ValueError('Could not convert "%s" to float' % str(s))
