Learn data science and machine learning by building real-world projects on Jovian

Sign up to execute **100-numpy-exercises-039b0** and 160,000+ data science projects. Build your own projects and share them online!

Created 4 months ago

The recommended way to run this notebook is to click the "Run" button at the top of this page, and select "Run on Binder". This will run the notebook on mybinder.org, a free online service for running Jupyter notebooks.

If you are stuck, you can ask for help on the community forum: https://jovian.ml/forum/t/100-numpy-exercises-hints-discussions-help/10561 . You can get help with errors, ask for hints, and share your solutions with others.

If you're new to Numpy, check out this notebook for a quick tutorial: https://jovian.ml/aakashns/python-numerical-computing-with-numpy

Remember to save a snapshot of your work from time to time using to your Jovian.ml account.

`!pip install jovian --upgrade --quiet`

`import jovian`

`jovian.commit(project='100-numpy-exercises')`

```
[jovian] Attempting to save notebook..
[jovian] Updating notebook "aakashns/100-numpy-exercises" on https://jovian.ml/
[jovian] Uploading notebook..
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ml/aakashns/100-numpy-exercises
```

`jovian.commit`

uploads the notebook to your Jovian.ml account, captures the Python environment and creates a shareable link for your notebook as shown above. You can use this link to share your work and let anyone (including you) run your notebooks and reproduce your work. Learn more: https://jovian.ml/docs/

```
# Ucomment the next line if you need install numpy
# !pip install numpy --upgrade
```

`np`

(★☆☆)` `

` `

` `

` `

` `

` `

` `

` `

` `

` `

Save your progress by commiting your work to Jovian

`import jovian`

`jovian.commit(project='numpy-100-exercises')`

```
[jovian] Attempting to save notebook..
[jovian] Updating notebook "aakashns/numpy-100-exercises" on https://jovian.ml/
[jovian] Uploading notebook..
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ml/aakashns/numpy-100-exercises
```

` `

` `

` `

` `

` `

` `

```
0 * np.nan
np.nan == np.nan
np.inf > np.nan
np.nan - np.nan
np.nan in set([np.nan])
0.3 == 3 * 0.1
```

` `

` `

` `

` `

Save your progress by commiting your work to Jovian

`import jovian`

`jovian.commit()`

```
[jovian] Attempting to save notebook..
[jovian] Updating notebook "aakashns/numpy-100-exercises" on https://jovian.ml/
[jovian] Uploading notebook..
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ml/aakashns/numpy-100-exercises
```

` `

` `

` `

` `

` `

```
# Author: Jake VanderPlas
print(sum(range(5),-1))
from numpy import *
print(sum(range(5),-1))
```

` `

```
Z**Z
2 << Z >> 2
Z <- Z
1j*Z
Z/1/1
Z<Z>Z
```

` `

```
np.array(0) / np.array(0)
np.array(0) // np.array(0)
np.array([np.nan]).astype(int).astype(float)
```

` `

` `

` `

Save your progress by commiting your work to Jovian

`import jovian`

`jovian.commit()`

```
[jovian] Attempting to save notebook..
[jovian] Updating notebook "aakashns/numpy-100-exercises" on https://jovian.ml/
[jovian] Uploading notebook..
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ml/aakashns/numpy-100-exercises
```

` `

```
np.sqrt(-1) == np.emath.sqrt(-1)
```

` `

` `

` `

` `

` `

` `

` `

` `

` `

Save your progress by commiting your work to Jovian

`import jovian`

`jovian.commit()`

```
[jovian] Attempting to save notebook..
[jovian] Updating notebook "aakashns/numpy-100-exercises" on https://jovian.ml/
[jovian] Uploading notebook..
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ml/aakashns/numpy-100-exercises
```

` `

` `

` `

` `

` `

`x`

and `y`

coordinates covering the [0,1]x[0,1] area (★★☆)` `

` `

` `

` `

` `

Save and commit your work.

`import jovian`

`jovian.commit()`

```
[jovian] Attempting to save notebook..
[jovian] Updating notebook "aakashns/numpy-100-exercises" on https://jovian.ml/
[jovian] Uploading notebook..
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ml/aakashns/numpy-100-exercises
```

` `

` `

` `

```
1, 2, 3, 4, 5
6, , , 7, 8
, , 9,10,11
```

` `

` `

` `

` `

` `

` `

` `

Save and commit your work.

`import jovian`

`jovian.commit()`

```
[jovian] Attempting to save notebook..
[jovian] Updating notebook "aakashns/numpy-100-exercises" on https://jovian.ml/
[jovian] Uploading notebook..
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ml/aakashns/numpy-100-exercises
```

` `

` `

` `

` `

` `

` `

` `

` `

` `

` `

` `

Save and commit your work

`import jovian`

`jovian.commit()`

```
[jovian] Attempting to save notebook..
[jovian] Updating notebook "aakashns/numpy-100-exercises" on https://jovian.ml/
[jovian] Uploading notebook..
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ml/aakashns/numpy-100-exercises
```

` `

` `

` `

` `

` `

` `

` `

` `

` `

`fill`

value when necessary) (★★★)` `

Save and commit your work.

`import jovian`

`jovian.commit()`

```
[jovian] Attempting to save notebook..
[jovian] Updating notebook "aakashns/numpy-100-exercises" on https://jovian.ml/
[jovian] Uploading notebook..
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ml/aakashns/numpy-100-exercises
```

` `

` `

` `

` `

` `

` `

` `

` `

` `

` `

Save and commit your work

`import jovian`

`jovian.commit()`

```
[jovian] Attempting to save notebook..
[jovian] Updating notebook "aakashns/numpy-100-exercises" on https://jovian.ml/
[jovian] Uploading notebook..
[jovian] Capturing environment..
[jovian] Committed successfully! https://jovian.ml/aakashns/numpy-100-exercises
```

` `

` `

` `

` `

` `

` `

` `

` `

` `

` `

Save and commit your work

`import jovian`

`jovian.commit()`

```
[jovian] Attempting to save notebook..
```

Congratulations on completing the 100 exercises, well done!

- Share your completed notebook on Facebook, LinkedIn or Twitter and challenge your friends.
- Share your solutions and help others on the forum: https://jovian.ml/forum/t/100-numpy-exercises-hints-discussions-help/10561
- Check out our course on "Data Analysis with Python: Zero to Pandas" - https://jovian.ml/learn/data-analysis-with-python-zero-to-pandas
- Star this repository to show your appreciation for the original author of this notebook: https://github.com/rougier/numpy-100