Skip to content

UnsupportedMissingError(type_name, column_name=None, advice=None) Source

Bases: NumdaplotError

Raised when a missing value (None) is given for a type that cannot hold one in an Array.

Only integers and booleans cannot be missing in an Array. A Table accepts their missing values.

Added in version 0.1.0

Parameters:

  • type_name (str)

    Name of the ndp.Type member that cannot hold a missing value.

  • column_name (str | None, default: None)

    Name of the Table column holding the missing values. When omitted, the values were given to an Array.

  • advice (str | None, default: None)

    What to do instead, for values given to an Array by an operation that has its own solution. When omitted, the advice of Array.from_list.

Attributes:

  • type_name

    Name of the ndp.Type member that cannot hold a missing value.

  • column_name

    Name of the Table column holding the missing values, or None for values given to an Array.

Examples:

import numdaplot as ndp

try:
    ndp.Array.from_list([1, None])
except ndp.UnsupportedMissingError as error:
    print(error)
# INT64 values cannot be missing in an Array. Remove them, or give dtype=ndp.Type.FLOAT64.