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: Module

A 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:
clipped

Report 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

at_index(index)[source]#

Extract a statically bounds-checked row, preserving all state leaves.

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#
flipped()[source]#
fluid_name: str | None#
classmethod from_data(data)[source]#
identifier: str | None#
items()[source]#
keys()[source]#
model: str | None#
property_valid(name)[source]#
provider: str | None#
providers: frozenset#
raw_property(name)[source]#

Read an enabled canonical/alias field without availability guards.

reference_id: object#
property shape#
classmethod stack(states)[source]#
status: Array#
supports_property(name)[source]#
to_data()[source]#

Export metadata, raw values, status and masks for a lossless round trip.

to_dict(include_aliases=False)[source]#

Export enabled raw numeric fields, never metadata/status or guards.

property valid#
values()[source]#