lale.schema_ranges module¶
- class lale.schema_ranges.SchemaRange(minimum=None, maximum=None, exclusive_minimum=False, exclusive_maximum=False, is_integer: bool = False, distribution: Optional[str] = None)[source]¶
Bases:
object
- diff(other: SchemaRange) Optional[bool] [source]¶
Returns None if the resulting region is impossible. Returns True if the other constraint was completely subtracted from self. If it could not be, then it returns False (and the caller should probably keep the other constraint as a negated constraint)
- classmethod fromSchema(schema: Any) SchemaRange [source]¶
- classmethod fromSchemaForOptimizer(schema: Any) SchemaRange [source]¶
- classmethod is_empty2(lower: SchemaRange, upper: SchemaRange) bool [source]¶
Determines if the range given by taking lower bounds from lower and upper bound from upper is empty (contains nothing) is_integer is assumed to be their disjunction
- remove_point(other: Union[int, float]) Optional[bool] [source]¶
Returns None if the resulting region is impossible. Returns True if the other constraint was completely subtracted from self. If it could not be, then it returns False (and the caller should probably keep the other constraint as a negated constraint)
- classmethod to_schema_with_optimizer(actual_range: SchemaRange, optimizer_range: SchemaRange) Dict[str, Any] [source]¶