Logical

Classes:

Condition([minimum, maximum, elementwise])

Compare the input against some condition

Compare(compare_fn, *args, **kwargs)

Compare processed values using some function that returns a boolean

class Condition(minimum=None, maximum=None, elementwise=False, *args, **kwargs)[source]

Bases: Transform

Compare the input against some condition

Parameters:
  • minimum

  • maximum

  • elementwise (bool) – if False, return True only if all values are within range. otherwise return bool for each tested value

  • *args

  • **kwargs

Methods:

process(input)

Attributes:

minimum

maximum

format_in

format_out

process(input)[source]
property minimum: [<class 'numpy.ndarray'>, <class 'float'>]
property maximum: [<class 'numpy.ndarray'>, <class 'float'>]
property format_in: dict
property format_out: dict
class Compare(compare_fn: callable, *args, **kwargs)[source]

Bases: Transform

Compare processed values using some function that returns a boolean

ie. process will return compare_fn(*args) from process.

it is expected that input will be an iterable with len > 1

Parameters:
  • compare_fn (callable) – Function used to compare the values given to Compare.process()

  • *args ()

  • **kwargs ()

Methods:

process(input)

process(input)[source]