Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: fix warnings emitted by loading npy/npz data files #679

Merged
merged 2 commits into from Aug 22, 2023

Conversation

rgommers
Copy link
Member

This caused CI failures, see gh-678. See the commit messages for how to load/save, for large npz files it's not enough to just roundtrip np.savez(np.load(...)).

This fixes the following warning:

UserWarning: Reading `.npy` or `.npz` file required additional header
parsing as it was created on Python 2. Save the file again to speed up
loading and avoid this warning.
To do so, it's necessary to actually load the data like this:
```
>>> import numpy as np
>>> a = np.load('dwt_matlabR2012a_result.npz')
>>> keys = list(a.keys())
>>> vals = [a[key] for key in keys]
>>> d = {key:val for key, val in zip(keys, vals)}
>>> np.savez('dwt_matlabR2012a_result.npz', **d)
```
@rgommers rgommers added this to the v1.5.0 milestone Aug 22, 2023
@rgommers
Copy link
Member Author

The 32-bit Windows jobs are failing on building contourpy 1.1.0 from source. I'll leave that for a separate PR.

@rgommers
Copy link
Member Author

I'll go ahead and merge this, since it's a trivial fix.

@rgommers rgommers merged commit 367ae36 into PyWavelets:master Aug 22, 2023
13 of 14 checks passed
@rgommers rgommers deleted the fix-npz-format-issues branch August 22, 2023 11:28
rgommers added a commit to rgommers/pywt that referenced this pull request Aug 22, 2023
As seen in PyWaveletsgh-679, contourpy fails to build from source on 32-bit.
This is fixable, it should build from source just fine. But
we don't want to deal with that if we can avoid it. And contourpy
1.0.7 works just fine.

[skip actions]
rgommers added a commit to rgommers/pywt that referenced this pull request Aug 22, 2023
As seen in PyWaveletsgh-679, contourpy fails to build from source on 32-bit.
This is fixable, it should build from source just fine. But
we don't want to deal with that if we can avoid it. And contourpy
1.0.7 works just fine.

[skip actions]
rgommers added a commit to rgommers/pywt that referenced this pull request Aug 22, 2023
…win32

As seen in PyWaveletsgh-679, contourpy fails to build from source on 32-bit.
This is fixable, it should build from source just fine. But
we don't want to deal with that if we can avoid it. And contourpy
1.0.7 works just fine.

Also drop wheel builds, that's doing twice the same.

[skip actions]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant