Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit 6222065

Browse files
committed
numpy-intro change
1 parent b66fdbc commit 6222065

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

book/_toc.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ parts:
6969
- file: numpy/intro.md
7070
title: Numpy
7171
sections:
72-
- file: numpy/introduction.ipynb
7372
- file: numpy/1d.ipynb
7473
- file: numpy/2d.ipynb
7574
title: "Two-Dimensional arrays and matrices"

book/numpy/intro.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
# Numpy
22

3-
This chapter is all about...
3+
The <b><code>numpy</code></b> package is one of the main packages when it comes to working with arrays and matrices in Python, making it indispensable to process and visualize scientific data. Its assortment of routines facilitates operations such as mathematical, logical, linear algebra, Fourier transforms, and much more. In this section, you will learn some of the most used <b><code>numpy</code></b> functions to work with multidimensional array objects.
4+
5+
As always, let's import the package we will use
6+
7+
`import numpy as np`
8+
9+
The following functions will be discussed in this Notebook:
10+
- <b><code>np.array()</code></b>
11+
- <b><code>np.zeros()</code></b>
12+
- <b><code>np.asarray()</code></b>
13+
- <b><code>np.shape()</code></b>
14+
- <b><code>np.min()</code></b>
15+
- <b><code>np.max()</code></b>
16+
- <b><code>np.mean()</code></b>
17+
- <b><code>np.sort()</code></b>
18+
- <b><code>np.linspace()</code></b>
19+
- <b><code>np.arange()</code></b>
20+
- <b><code>np.argmax()</code></b>
21+
- <b><code>np.argmin()</code></b>
22+
- <b><code>np.where()</code></b>
23+
- <b><code>np.astype()</code></b>
24+
- <b><code>np.dot()</code></b>
25+
- <b><code>np.transpose()</code></b>
26+
- <b><code>np.loadtxt()</code></b>
27+
- <b><code>np.sum()</code></b>
28+
- <b><code>np.cos()</code></b>
29+
- <b><code>np.sin()</code></b>
30+
- <b><code>np.sqrt()</code></b>
31+
32+
33+
In Section 2.3, of Notebook 2, you have already encountered lists, which are created with square brackets <b><code>[]</code></b>. Arrays are the <b><code>numpy</code></b> equivalent of lists, with a few characteristic traits:<br><br>- <b><code>numpy</code></b> arrays can only store one type of element,<br>- <b><code>numpy</code></b> arrays take up much less memory than lists,<br>- <b><code>numpy</code></b> arrays have a much better runtime behavior,<br>- it is easier to work with multi-dimensional <b><code>numpy</code></b> arrays than with multi-dimensional lists<br><br>
434

5-
% a short overview for this chapter
635

0 commit comments

Comments
 (0)