Skip to content

InvalidSizeError(width, height) Source

Bases: NumdaplotError

Raised when the width or the height of a Size is zero or negative.

Added in version 0.1.0

Parameters:

  • width (float)

    The width given.

  • height (float)

    The height given.

Attributes:

  • width

    The width given.

  • height

    The height given.

Examples:

import numdaplot as ndp

try:
    ndp.Size(width=0, height=4.8)
except ndp.InvalidSizeError as error:
    print(error)
# Expected a positive width and height, got 0 and 4.8.