Fix jax 0.10+ issue where exit arrays were not identical anymore#976
Conversation
| @@ -0,0 +1 @@ | |||
| The tests `test_get_mean_gaussian` and `test_get_mean_skew_gaussian` used exact floating-point equality (`==`) to compare results, which broke in JAX 0.10.x due to a 1-ULP change in how XLA compiles broadcast array division; replaced with `np.testing.assert_allclose`. | |||
There was a problem hiding this comment.
By "JAX 0.10.x", do you mean all possible versions starting from the 0.10.0? I see that JAX had a newer release on May, 20. I am wondering whether this bug still affects the latest version or only older ones.
There was a problem hiding this comment.
Yes, all new versions since 0.10.0 have this problem, so this test will never work with the old syntax
eleonorav89
left a comment
There was a problem hiding this comment.
Perfect then, thank you for answering my comment
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #976 +/- ##
=======================================
Coverage 96.23% 96.23%
=======================================
Files 48 48
Lines 10099 10099
=======================================
Hits 9719 9719
Misses 380 380 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The slack link seems not to work, but when you click on it it does. Merging |
The tests
test_get_mean_gaussianandtest_get_mean_skew_gaussianused exact floating-point equality (==) to compare results, which broke in JAX 0.10.x due to a 1-ULP change in how XLA compiles broadcast array division; replaced withnp.testing.assert_allclose. See failure at https://github.com/StingraySoftware/stingray/actions/runs/26394461791/job/77691734686