It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

Get started on your learning journey towards data science using Python. Equip yourself with practical skills in Python programming for the purpose of basic data manipulation and analysis.

Let's begin with the basics of NumPy. There are different ways to create NumPy arrays but the easiest way will be to use something that we are all familiar with, which are lists, and pass it to the `array()`

function.

**Syntax**

nameofarray = np.array(lists)

Below are some examples. Click on the **Run **button in each trinket to view the results.

To find out what data types are in an array, you can use `.dtype`

**Syntax**

print(myArray.dtype)

You can edit an element in an array by referring to its index.

Recall that `myArray = [1 2 3 4 5 6 7]`

. You can change the first element of `myArray`

from `1`

to `20`

by referring to its index (which is `0`

).

myArray[0] = 20

You can also check the shape of an array (i.e. number of rows and columns) using `.shape`

1. Create a rank 2 (2D) array that resembles the matrix below.

[[11 12 13 14] [15 16 17 18]]

2. Find out the shape of the above array