gpflow.experimental.check_shapes.bool_specs#

Code for specifying and evaluating boolean expressions.

Classes#

gpflow.experimental.check_shapes.bool_specs.BoolTest#

class gpflow.experimental.check_shapes.bool_specs.BoolTest(value)[source]#

Bases: Enum

Strategies for converting a value to bool.

gpflow.experimental.check_shapes.bool_specs.ParsedAndBoolSpec#

class gpflow.experimental.check_shapes.bool_specs.ParsedAndBoolSpec(left, right)[source]#

Bases: ParsedBoolSpec

An “and” expression.

Parameters:
get(arg_map, context)[source]#

Evaluate this boolean value.

Parameters:
  • arg_map (Mapping[str, Any]) –

  • context (ErrorContext) –

Return type:

Tuple[bool, ErrorContext]

gpflow.experimental.check_shapes.bool_specs.ParsedArgumentRefBoolSpec#

class gpflow.experimental.check_shapes.bool_specs.ParsedArgumentRefBoolSpec(argument_ref, bool_test)[source]#

Bases: ParsedBoolSpec

A reference to an input argument.

Parameters:
get(arg_map, context)[source]#

Evaluate this boolean value.

Parameters:
  • arg_map (Mapping[str, Any]) –

  • context (ErrorContext) –

Return type:

Tuple[bool, ErrorContext]

gpflow.experimental.check_shapes.bool_specs.ParsedBoolSpec#

class gpflow.experimental.check_shapes.bool_specs.ParsedBoolSpec[source]#

Bases: ABC

A boolean expression.

abstract get(arg_map, context)[source]#

Evaluate this boolean value.

Parameters:
  • arg_map (Mapping[str, Any]) –

  • context (ErrorContext) –

Return type:

Tuple[bool, ErrorContext]

gpflow.experimental.check_shapes.bool_specs.ParsedNotBoolSpec#

class gpflow.experimental.check_shapes.bool_specs.ParsedNotBoolSpec(right)[source]#

Bases: ParsedBoolSpec

A “not” expression.

Parameters:

right (ParsedBoolSpec) –

get(arg_map, context)[source]#

Evaluate this boolean value.

Parameters:
  • arg_map (Mapping[str, Any]) –

  • context (ErrorContext) –

Return type:

Tuple[bool, ErrorContext]

gpflow.experimental.check_shapes.bool_specs.ParsedOrBoolSpec#

class gpflow.experimental.check_shapes.bool_specs.ParsedOrBoolSpec(left, right)[source]#

Bases: ParsedBoolSpec

An “or” expression.

Parameters:
get(arg_map, context)[source]#

Evaluate this boolean value.

Parameters:
  • arg_map (Mapping[str, Any]) –

  • context (ErrorContext) –

Return type:

Tuple[bool, ErrorContext]