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

Commits on Aug 22, 2023

  1. MAINT: save the npz file for pywt.data.nino with a recent numpy

    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.
    rgommers committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    4c764df View commit details
    Browse the repository at this point in the history
  2. TST: save Matlab compatibility test data with a recent numpy version

    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 committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    2bce360 View commit details
    Browse the repository at this point in the history