Skip to content

InvalidDeviationError(deviation) Source

Bases: NumdaplotError

Raised when a normal distribution is given a negative standard deviation.

Added in version 0.1.0

Parameters:

  • deviation (float)

    The rejected standard deviation.

Attributes:

  • deviation

    The rejected standard deviation.

Examples:

import numdaplot as ndp

try:
    ndp.Normal(mean=0, deviation=-1)
except ndp.InvalidDeviationError as error:
    print(error)
# Expected a deviation of at least 0, got -1.