Avatar for the GalacticDynamics user
GalacticDynamics
unxt
BlogDocsChangelog

Performance History

Latest Results

πŸ› fix(unxt): support jax 0.12 (`erfc_p` accuracy, `polynomial_p`) (#1005) * πŸ› fix(unxt): support jax 0.12 (`erfc_p` accuracy, `polynomial_p`) The weekly newest-deps ecosystem job (jax 0.12.0, quax 0.4.6) failed twice: - `lax.erfc` now binds `erfc_p` with an `accuracy` param, which the `erfc_p` rule's `(x)` signature rejected. It now takes `/, **kw` and passes them through, like `exp_p` / `log_p`. - `jnp.polyval` (and so `jax.scipy.special.spence`) now lowers to the new `polynomial_p` primitive instead of `mul` / `add`, so quax materialised the quantity. Add `polynomial_p` rules (guarded on JAX 0.12.0): the result takes the constant term's unit, and coefficient `k` is converted to that unit over `x`'s unit to the `k`. Require quax>=0.4.6, the first release that supports jax 0.12 (its own floor is still jax>=0.7.2), and re-lock only quax (0.4.4 -> 0.4.6). * βœ… test(unxt): doctests tolerate jax 0.12's more accurate special functions jax 0.12 moved `igamma`, `igammac`, `gammaln` and `betainc` closer to their true values (e.g. `betainc(2, 3, 0.5)` is now exactly 0.6875), which broke the last float32 digits of 12 doctests on the newest-deps job. Truncate the expected values to the digits both old and new jax agree on. * πŸ“ docs(unxt): reword the polynomial_p uncovered-case comment * βœ… test(unxt): xfail `jnp.hypot` on dimensionful quantities on jax 0.12 jax 0.12 rewrote `jnp.hypot` to rescale by powers of two, guarded by comparisons of `max(|x1|, |x2|)` against raw constants, which unxt refuses for dimensionful quantities. Mark `test_hypot` as a strict xfail on JAX >= 0.12 until it is fixed in quax, and drop the two `select_n` doctest examples that only used `jnp.hypot` to illustrate its old lowering. * πŸ› fix(unxt): polynomial dtype promotion and static result; add one_minus_square_p From an independent audit of this PR: - `_polynomial` cast unit-converted (float) coefficients back to an int `x`'s dtype, so e.g. `polyval(Q([1, 1], ""), Q(50, "%"))` gave 1 instead of 1.5. Dtype-promote the stripped values first, as `add_p` does. - A `StaticQuantity` constant term made the result a `StaticQuantity`, which raises under `jit`. The result is computed, so return a `Quantity`. - JAX 0.11.2 added `one_minus_square_p`, used by the JVPs of `tanh`, `asin`, `acos` and `atanh`; differentiating them inside `quax.quaxify` refused to materialise the quantity. Register a dimensionless rule. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
main
6 days ago

Latest Branches

CodSpeed Performance Gauge
0%
πŸ‘·: update pre-commit hooks#942
27 days ago
49987b5
update-hooks
CodSpeed Performance Gauge
-11%
3 months ago
0080e56
nstarman:claude/unit-systems-plum-d66f71
CodSpeed Performance Gauge
-19%
Β© 2026 CodSpeed Technology
Home Terms Privacy Docs