check_in_interval — skchange

Skip to main content
`Ctrl`+`K`

# check_in_interval

check_in_interval(interval: Interval, value: Number, name: str, allow_none: bool = False) → Number

  Check if value is non-negative.

  Parameters:
    intervalpd.Interval

      Interval to check.

    valueint, float

      Value to check.

    namestr

      Name of the parameter to be shown in the error message.

    allow_nonebool, optional (default=False)

      Whether to allow None values.

  Returns:
    valueint, float

      Input value.

  Raises:
    ValueError

      If value is negative.