def positive_float(val):
    val = float(val)
    if val <= 0:
        raise TypeError("must be a positive number")
    return val
dataset/ETHPy150Open dougalsutherland/py-sdm/sdm/utils.py/positive_float/original