jaxprop.fluid_state module#
Immutable, JAX-compatible fluid values with explicit property availability.
- class jaxprop.fluid_state.FluidState(fluid_name=None, identifier=None, *, provider=None, providers=None, model=None, reference_id=None, available_properties=None, error_policy='raise', status=None, clipped=None, property_validity=None, **properties)[source]#
Bases:
ModuleA numeric pytree whose public properties enforce their availability.
Raw leaves are private so Equinox/JAX transformations never invoke guarded public lookups. Metadata contains only immutable, non-array values.
- Attributes:
clippedReport recovered clipped elements, independently of failure status.
- shape
- valid
Methods
at_index(index)Extract a statically bounds-checked row, preserving all state leaves.
raw_property(name)Read an enabled canonical/alias field without availability guards.
to_data()Export metadata, raw values, status and masks for a lossless round trip.
to_dict([include_aliases])Export enabled raw numeric fields, never metadata/status or guards.
flipped
from_data
items
keys
property_valid
stack
supports_property
values
- available_properties: frozenset#
- property clipped#
Report recovered clipped elements, independently of failure status.
Unclipped states store no mask. Materialize their all-false flags only when requested, preserving the numerical leaves of ordinary calls.
- error_policy: str#
- fluid_name: str | None#
- identifier: str | None#
- model: str | None#
- provider: str | None#
- providers: frozenset#
- reference_id: object#
- property shape#
- status: Array#
- to_dict(include_aliases=False)[source]#
Export enabled raw numeric fields, never metadata/status or guards.
- property valid#