module documentation
Utility functions for the halfspace
package.
Function | check |
Check that a scalar satisfies certain conditions. |
Function | log |
Log a table header. |
Function | log |
Log a table row. |
def check_scalar(x:
Any
, name: str
, var_type: Optional[ Union[ Type, tuple[ Type, ...]]]
= None, lb: Optional[ Union[ float, int]]
= None, ub: Optional[ Union[ float, int]]
= None, include_boundaries: bool
= True):
(source)
¶
Check that a scalar satisfies certain conditions.
Returns: None
Parameters | |
x:Any | Any The scalar to check. |
name:str | str, The name of the scalar. Used for error messages. |
varOptional[ | type or tuple of types, default=`None`
The expected type(s) of the scalar. If None , then no type checking is performed. |
lb:Optional[ | float or int, default=`None`
The lower bound of the scalar. If None , then no lower bound checking is performed. |
ub:Optional[ | float or int, default=`None`
The upper bound of the scalar. If None , then no upper bound checking is performed. |
includebool | bool, default=`True` Whether to include the boundaries in the bound checking. |
Log a table header.
Logging level is set to logging.INFO
.
Returns: None
Parameters | |
columns:Iterable[ | iterable of str The column names of the table |
width:int | int, default=15 The width of each column. |