Skip to content

InvalidFractionError(value) Source

Bases: NumdaplotError

Raised when a value expected to be a fraction is lower than 0, greater than 1 or not a number.

Added in version 0.1.0

Parameters:

  • value (float)

    The rejected value.

Attributes:

  • value

    The rejected value.

Examples:

import numdaplot as ndp

try:
    ndp.Quantile(1.5)
except ndp.InvalidFractionError as error:
    print(error)
# Expected a fraction between 0 and 1, got 1.5.