Dimension#
- class dynode.config.dimension.Dimension(*, name: Annotated[str, BeforeValidator(func=_verify_name, json_schema_input_type=PydanticUndefined)], bins: List[Bin])#
Bases:
BaseModel
A dimension of an compartment.
- __init__(**data: Any) None #
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Methods
Attributes
Dimension idxs for indexing the bins within this dimension.
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: Annotated[str, BeforeValidator(func=_verify_name, json_schema_input_type=PydanticUndefined)]#
- property idx#
Dimension idxs for indexing the bins within this dimension.
- classmethod _check_bins_same_type(bins) Self #
Assert all bins are of same type and bins is not empty.
- classmethod _validate_discretized_int_bins_sorted(bins: list[Bin]) list[Bin] #
Assert that DiscretizedPositiveIntBin do not overlap and sorts them lowest to highest.
- classmethod _validate_no_gaps_discretized_int_bins(bins: list[Bin]) list[Bin] #
Validate that dimensions of DiscretizedPositiveIntBin have no gaps.
- _abc_impl = <_abc._abc_data object>#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].