100 numpy exercises (with solutions)
This is a collection of numpy exercises from numpy mailing list, stack overflow, and numpy documentation. I've also created some problems myself to reach the 100 limit. The goal of this collection is to offer a quick reference for both old and new users but also to provide a set of exercises for those who teach. For extended exercises, make sure to read From Python to NumPy.
→ Test them on Binder
→ Read them on GitHub
Note: markdown and ipython notebook are created programmatically from the source data in source/exercises.ktx.
To modify the content of these files, please change the text in the source and run the generators.py module with a python
interpreter with the libraries under requirements.txt installed.
The keyed text format (ktx) is a minimal human readable key-values to store text (markdown or others) indexed by keys.
This work is licensed under the MIT license.
Exercise 79 first solution raises NameError: name 'distance' is not defined
Q52: shape mismatch between prompt and solution
Question 22 is underspecified
error with installing requirements
Q.88 incorrect answer - existing answer does not to compute borders
Unit tests / Asserting answers
Q83 doesn't directly work for floats or sparse integers
I have a better way to solve exercise 89
I have a better way to solve exercise 12
Alternative solutions for Exercises N36, N81