Commit 443a264
fix(transformer): tell Python <3.12 users to upgrade, not to pip install nufftax
The nufftax ModuleNotFoundError said "Install it via the command
`pip install nufftax`". On Python 3.11 that is actively bad advice.
The nufftax releases that work with our JAX stack (0.4.x) declare
requires_python >= 3.12, so pip resolves 0.6.x instead — and both 0.6.x
releases break the interferometer inversion:
- 0.6.0 uses jax.interpreters.batching.not_mapped, removed in JAX 0.10
- 0.6.1 cannot handle the rank-4 input transform_mapping_matrix produces
under vmap (ValueError: too many values to unpack (expected 3))
So a 3.11 user who follows the old message installs a broken nufftax and fails
partway through a fit instead of at import — strictly worse than the original
error. There is currently no nufftax release that both installs on 3.11 and
works.
The message now branches on sys.version_info: below 3.12 it says not to install
nufftax and offers upgrading to 3.12+ or the pynufft backend; 3.12+ keeps the
existing text. Both branches covered by tests.
Only the error text changes — no behaviour change on 3.12+.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012EZTtyLUAyKWuATyk4mkcm1 parent 1893885 commit 443a264
2 files changed
Lines changed: 74 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
44 | 71 | | |
45 | 72 | | |
46 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
0 commit comments