Skip to content

InvalidResolutionError(dpi) Source

Bases: NumdaplotError

Raised when the dpi of ImageOptions is lower than 1.

Added in version 0.1.0

Parameters:

  • dpi (int)

    The rejected number of dots per inch.

Attributes:

  • dpi

    The rejected number of dots per inch.

Examples:

import numdaplot as ndp

try:
    ndp.ImageOptions(dpi=0)
except ndp.InvalidResolutionError as error:
    print(error)
# Expected a resolution of at least 1 dot per inch, got 0.