continuous_timeseries.domain_helpers#
Support for our domain handling
Functions:
| Name | Description |
|---|---|
check_no_times_outside_domain |
Check that no times are outside the supported domain |
validate_domain |
Check that domain values are valid |
check_no_times_outside_domain #
check_no_times_outside_domain(
times: Union[PINT_NUMPY_ARRAY, PINT_SCALAR],
domain: tuple[PINT_SCALAR, PINT_SCALAR],
) -> None
check_no_times_outside_domain(
times: Union[NP_ARRAY_OF_FLOAT_OR_INT, NP_FLOAT_OR_INT],
domain: tuple[NP_FLOAT_OR_INT, NP_FLOAT_OR_INT],
) -> None
check_no_times_outside_domain(
times: Union[
PINT_NUMPY_ARRAY,
PINT_SCALAR,
NP_ARRAY_OF_FLOAT_OR_INT,
NP_FLOAT_OR_INT,
],
domain: Union[
tuple[PINT_SCALAR, PINT_SCALAR],
tuple[NP_FLOAT_OR_INT, NP_FLOAT_OR_INT],
],
) -> None
Check that no times are outside the supported domain
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
times
|
Union[PINT_NUMPY_ARRAY, PINT_SCALAR, NP_ARRAY_OF_FLOAT_OR_INT, NP_FLOAT_OR_INT]
|
Times to check |
required |
domain
|
Union[tuple[PINT_SCALAR, PINT_SCALAR], tuple[NP_FLOAT_OR_INT, NP_FLOAT_OR_INT]]
|
Supported domain |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
There are values in |
Source code in src/continuous_timeseries/domain_helpers.py
validate_domain #
validate_domain(
domain: Union[
tuple[PINT_SCALAR, PINT_SCALAR],
tuple[NP_FLOAT_OR_INT, NP_FLOAT_OR_INT],
],
) -> None
Check that domain values are valid
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
Union[tuple[PINT_SCALAR, PINT_SCALAR], tuple[NP_FLOAT_OR_INT, NP_FLOAT_OR_INT]]
|
Domain to check |
required |
Raises:
| Type | Description |
|---|---|
AssertionError
|
|