pyrtma.validators.Float

class Float(*args)[source]

Bases: FloatValidatorBase[_P, c_float], Generic[_P]

32-bit Float validator class

Methods

validate_many

Validate multiple float values

validate_one

Validate a float value

validate_many(value)

Validate multiple float values

Parameters:

value (Iterable[float | int]) – Iterable of floats to validate

Raises:
  • TypeError – Wrong type

  • ValueError – Value cannot be precisely represented with this datatype

validate_one(value)

Validate a float value

Parameters:

value (float | int | TypeVar(_C)) – Float value

Raises:
  • TypeError – Wrong type

  • ValueError – Value cannot be precisely represented with this datatype