import click


def _cb_gt_zero(ctx, param, value):

    """
    Click callback to validate integers and floats that must be >= 0

    Parameters
    ----------
    ctx : click.Context
        Ignored.
    param : click.Param
        Ignored.
    value : float
        Must be positive.

    Returns
    -------
    float
    """

    if not value >= 0:
        raise click.BadParameter("must be >= 0, not `{0}'".format(value))
    return value