Conversation
|
Hello, I just wanted to check-in on the status here. Thanks in advance! |
mraspaud
left a comment
There was a problem hiding this comment.
Thanks a lot for the fix! Looks good to me.
|
@cshatto sorry for the late reaction, I'm the author of this reader and am currently travelling (EUM conference). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3475 +/- ##
=======================================
Coverage 96.36% 96.36%
=======================================
Files 465 465
Lines 59382 59382
=======================================
Hits 57225 57225
Misses 2157 2157
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hi @mraspaud thank you and no problem at all! This small change was blocking our numpy upgrade to > 2 so that is why I poked the issue again. Numpy 2.4 changed the behavior of a 1D array being converted to a scalar, so it could be that the data always behaved as a scalar because numpy was converting it silently from 1D array to scalar. |
JAXA stores
Resampling_interval,Number_of_linesandNumber_of_pixelsas one-element arrays, which the SGLI reader passed to numpy unchanged — relying on the implicit array-to-scalar conversion removed in numpy 2.4, so every real GCOM-C/SGLI granule now fails withTypeError: only 0-dimensional arrays can be converted to Python scalars. This PR calls.item()at the three read sites and rebuilds the test fixtures with one-item arrays so they match real files.Closes #3470