Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

melissawm
Copy link
Member

Hi all,

This is the draft for the How to on storing and reading arrays from disk with NumPy. A couple of comments:

  1. This does not cover all topics raised in this NumPy issue. That was too much for one How To. The current plan is to do another How To specifically mentioning cloud storage and more complicated issues, and an "Explanation" or "Discussions" page on the NumPy storage model and advanced performance comments.
  2. There is definitely a bit more discussion than what would be recommended by the How To guide we're using. I'm aware of that, and I'm happy to take feedback on this, but I just couldn't see how to explain all this without some minor explanations.

Suggestions and feedback are much appreciated!

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB

@eric-wieser
Copy link
Member

@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.)"
Copy link
Member

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.

@rossbar
Copy link
Collaborator

rossbar commented Jul 20, 2020

was the intent to use the mystnb format here for a better plaintext view when reviewing?

The primary goal of using something like myst-nb for the numpy-tutorials repo is to allow users to submit content in formats other than rST. The text-based notebook format is a nice feature, but I don't think the numpy-tutorials repo will have a policy recommending one format over any other. Hopefully the text-based format catches on with Jupyter users and we start seeing submissions with that format.

@rgommers rgommers added the enhancement New feature or request label Jul 21, 2020
Copy link
Member

@rgommers rgommers left a 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.

bjnath added a commit to bjnath/numpy-tutorials that referenced this pull request Jul 21, 2020
Trying a leaner approach than numpy#14 for the I/O how-to.
@bjnath bjnath mentioned this pull request Jul 21, 2020
@melissawm
Copy link
Member Author

melissawm commented Jul 31, 2020

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.

@melissawm melissawm closed this Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants