• Stars
    star
    413
  • Rank 101,261 (Top 3 %)
  • Language
    Python
  • License
    Other
  • Created about 4 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

NumPy tutorials & educational content in notebook format

NumPy tutorials

For the rendered tutorials, see https://numpy.org/numpy-tutorials/.

The goal of this repository is to provide high-quality resources by the NumPy project, both for self-learning and for teaching classes with. If you're interested in adding your own content, check the Contributing section. This set of tutorials and educational materials is not a part of the NumPy source tree.

To download a local copy of the .ipynb files, you can either clone this repository or navigate to any of the documents listed below and download it individually.

Content

  1. Learn to write a NumPy tutorial: our style guide for writing tutorials.
  2. Tutorial: Linear algebra on n-dimensional arrays
  3. Tutorial: Determining Moore's Law with real data in NumPy
  4. Tutorial: Saving and sharing your NumPy arrays
  5. Tutorial: NumPy deep learning on MNIST from scratch
  6. Tutorial: X-ray image processing
  7. Tutorial: NumPy deep reinforcement learning with Pong from pixels
  8. Tutorial: Masked Arrays
  9. Tutorial: Static Equilibrium
  10. Tutorial: Plotting Fractals
  11. Tutorial: NumPy natural language processing from scratch with a focus on ethics
  12. Tutorial: Analysing the impact of the lockdown on air quality in Delhi, India

Contributing

We very much welcome contributions! If you have an idea or proposal for a new tutorial, please open an issue with an outline.

Donโ€™t worry if English is not your first language, or if you can only come up with a rough draft. Open source is a community effort. Do your best โ€“ weโ€™ll help fix issues.

Images and real-life data make text more engaging and powerful, but be sure what you use is appropriately licensed and available. Here again, even a rough idea for artwork can be polished by others.

The NumPy tutorials are a curated collection of MyST-NB notebooks. These notebooks are used to produce static websites and can be opened as notebooks in Jupyter using Jupytext.

Note: You should use CommonMark markdown cells. Jupyter only renders CommonMark.

Why Jupyter Notebooks?

The choice of Jupyter Notebook in this repo instead of the usual format (reStructuredText, through Sphinx) used in the main NumPy documentation has two reasons:

  • Jupyter notebooks are a common format for communicating scientific information.
  • Jupyter notebooks can be launched in Binder, so that users can interact with tutorials
  • rST may present a barrier for some people who might otherwise be very interested in contributing tutorial material.

Note

You may notice our content is in markdown format (.md files). We review and host notebooks in the MyST-NB format. We accept both Jupyter notebooks (.ipynb) and MyST-NB notebooks (.md). If you want to sync your .ipynb to your .md file follow the pairing tutorial.

Adding your own tutorials

If you have your own tutorial in the form of a Jupyter notebook (a .ipynb file) and you'd like to add it to the repository, follow the steps below.

Create an issue

Go to https://github.com/numpy/numpy-tutorials/issues and create a new issue with your proposal. Give as much detail as you can about what kind of content you would like to write (tutorial, how-to) and what you plan to cover. We will try to respond as quickly as possible with comments, if applicable.

Check out our suggested template

You can use our Tutorial Style Guide to make your content consistent with our existing tutorials.

Upload your content

    Fork this repository (if you haven't before).
    In your own fork, create a new branch for your content.
    Add your notebook to the content/ directory.

    Update the environment.yml file with the dependencies for your tutorial (only if you add new dependencies).

    Update this README.md to include your new entry.

    Update the attribution section (below) to credit the original tutorial author, if applicable.

    Create a pull request. Make sure the "Allow edits and access to secrets by maintainers" option is selected so we can properly review your submission.

    ๐ŸŽ‰ Wait for review!

For more information about GitHub and its workflow, you can see this document.

Building the Sphinx site locally

Building the tutorials website, which is published at https://github.com/numpy/numpy-tutorials, locally isn't necessary before making a contribution, but may be helpful:

conda env create -f environment.yml
conda activate numpy-tutorials
cd site
make html

Translations

While we don't have the capacity to translate and maintain translated versions of these tutorials, you are free to use and translate them to other languages.

Useful links and resources

The following links may be useful:

Note that regular documentation issues for NumPy can be found in the main NumPy repository (see the Documentation labels there).

More Repositories

1

numpy

The fundamental package for scientific computing with Python.
Python
26,137
star
2

numpy-financial

Standalone package of the NumPy financial functions
Python
295
star
3

numpy-stubs

Experimental typing stubs for NumPy
Python
281
star
4

numpydoc

Numpy's Sphinx extensions
Python
251
star
5

numpy.org

The NumPy home page
HTML
103
star
6

SVML

Vendored files from Intel's SVML
Assembly
30
star
7

numpy-refactor

INACTIVE - abandoned refactoring effort
C
27
star
8

numpy-dtypes

Repository for the development of user dtypes for numpy.
C
22
star
9

numpy-newsletter

Content for the NumPy newsletter, which anyone can sign up for in the numpy.org footer
15
star
10

archive

Archive of documents related to the project governance and management
Jupyter Notebook
13
star
11

numpy-user-dtypes

Repository for example user DTypes using the new API
C
11
star
12

doc

Home of NumPy user and reference documentation
HTML
10
star
13

numpy-surveys

Prepare content for surveys, and code/tools to analyze the results
10
star
14

bitgenerators

Additional bitgenerators for the random generators within numpy.
C
9
star
15

windows-wheel-builder

INACTIVE - this repo is no longer maintained
C
8
star
16

devdocs

Latest auto-generated development docs
HTML
7
star
17

datetime

Repo for datetime improvements
Python
6
star
18

neps

Auto-generated NumPy Enhancement Proposals
HTML
5
star
19

numpy-vendor

Upstream source code for dependencies
Fortran
5
star
20

numpy.github.com

Auto-generated NumPy website. Since this is an auto-generated directory, do *not* submit pull requests against this repository. The actual sources are in https://github.com/numpy/numpy.org
HTML
5
star
21

numpyorg-benchmarks

Benchmarks used in the numpy.org website content
Python
4
star
22

user-survey-2020-details

Analysis and publication of NumPy community survey results
Python
2
star
23

numpy-readthedocs-redirect

Python
1
star
24

.github

default community health files for all repos in the NumPy GitHub org
1
star