-
-
Notifications
You must be signed in to change notification settings - Fork 196
Added new How To (simple io with NumPy) #14
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
Conversation
Check out this pull request on Review Jupyter notebook visual diffs & provide feedback on notebooks. Powered by ReviewNB |
@rossbar, was the intent to use the mystnb format here for a better plaintext view when reviewing? |
"temperatures = air_temperature[:]\n", | ||
"```\n", | ||
"\n", | ||
"To simplify our example, we'll read only the temperature data between July 1st and July 31st, 2019. These are indexed by 181 and 211, respectively, in the first axis of our `air_temperature` array (remember that when slicing the stop value - 212 in the expression below - is not included in the final result.)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be good to show where 181 and 212 came from, or a way of finding them programmatically.
The primary goal of using something like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main comment is that I think it would be best to put the things most users are looking for upfront. Those are:
- loading and saving arrays (binary); simple (
.npy
) and large (Zarr) - loading and saving multiple arrays in a single file (
.npz
, Zarr) - loadings and saving arrays in text format (
savetxt
& friends)
NetCDF4 and structured arrays are a bit niche in comparison. I'd probably leave them out completely. Maybe structured arrays can come at the end. NetCDF4 seems like a separate topic, one of many other formats users can encounter. Maybe worth as an overview table of important formats and how they're supported, but not as the very first example on the page I'd think.
Trying a leaner approach than numpy#14 for the I/O how-to.
Thanks for the comments. Since some of the discussion has moved to #15 , it might be better to continue there and closing (or at least pausing) this issue. If there is still value in this document after that, I'll retake it. |
Hi all,
This is the draft for the How to on storing and reading arrays from disk with NumPy. A couple of comments:
Suggestions and feedback are much appreciated!