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

npz Loader and Saver #18

Closed
casabre opened this issue Apr 7, 2024 · 0 comments · Fixed by #19
Closed

npz Loader and Saver #18

casabre opened this issue Apr 7, 2024 · 0 comments · Fixed by #19

Comments

@casabre
Copy link
Member

casabre commented Apr 7, 2024

Loading and saving from numpy npz files would be helpful.

The data should be stored in the i and q format in the numpy file, e.g.

np.savez_compressed("file.npz", i=np.real(data), q=np.imag(data))

file = np.load("file.npz")
restored_data = file["i"] + 1j * file["q"]

assert np.array_equal(data, restored_data)

Additionally, the following parameter for the Saver would be beneficial:

  • store_astype which converts the data type before saving (defaults to np.float16)
  • compress which would use the compressed version of npz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant