blob: 57debfdc302bee852583932e9bc24e22120a1f24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# Arrays
In this tutorial we will be introducing arrays and we will be using the numpy library. Arrays, lists, vectors, matrices, sets - You might've heard of them before, they all store data. In programming, an array is a variable that can hold more than one value at a time. We will be using the Numpy python library to create arrays.
Since we already have installed Numpy previously, we can start using the package.
## Import Numpy
When using packages in python, we need to let it know what package we will be using. This is called importing. To import numpy we need to declare it a the start of a script as follows:
```
import numpy as np
```
<code> import numpy </code> specifies what library to import.
<code> as np </code> gives the library an alias in your script. It's common convention in Python programming to make the code shorter and more readable. We will be using *np* as it's a standard using in many projects.
# Creating arrays
Now that the script has been
```
```
|