Skip to content

v0.2.8

Choose a tag to compare

@github-actions github-actions released this 29 Sep 22:44
Updated typing hints in coordax to avoid false type errors in pyrefly.

1. Added overload to utils.export to preserve decorated types;
2. Replaced partial(utils.export, ...) with @utils.export(module=...);
3. Added Sequence[Coordinate] __init__ to CartesianProduct and ArrayLike __init__ to LabeledAxis;
4. Parameterized coords.extract with CoordinateT TypeVar;
5. Changed is_coord, is_field, and is_namedarray from TypeGuard to TypeIs;
6. Added structural _NDArrayProtocol under TYPE_CHECKING for duck-typed arrays (e.g. jax_datetime).

Resolves bad-argument-type on CartesianProduct, LabeledAxis, coords.compose, and cx.field(jax_datetime), missing-attribute on coords.extract, and narrowing errors after is_coord/is_field.

PiperOrigin-RevId: 990575393