The concept of **“dimensional”** in numpy **is different** with dimensional** in math.** In Math, dimensions is defined as **the minimum number of coordinates** needed to specify points within a space. So, 1 dimension consist of 1 variable X , 2 dimensions consist of 2 variables X &Y and 3 dimensions consist of 3 variables X,Y & Z.

Meanwhile **dimensional in python** is a** container of items of the same type and size**.The dimension can consist of of 1 or multi dimensional container. That’s why it named N-dimensional array.

I will give you examples.

Open your Linux Terminal, run python and type the code below.

**Sample for 1 dimensional array**

$ python3 Python 3.6.9 (default, Nov 7 2019, 10:44:02) [nGCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>import numpy as np>>>x=np.array([1,2,3])>>>xarray([1, 2, 3]) >>>x.ndim1 >>>x.shape(3,) >>>

This is 1 dimensional array that consist of 3 columns.

**Sample for 2 dimensional array**

>>> x=np.array([[1,1],[2,2]]) >>> x array([[1, 1], [2, 2]]) Display the dimension >>> x.ndim 2

Display the array shape

>>> x.shape (2, 2)

You can read it as 2 ‘1-dimensional array’ ([1,1] and [2,2]) that each of it consist of 2 columns ([1,1] and [2,2]).

>>> x=np.array([[1,1,1],[2,2,2]]) >>> x array([[1, 1, 1], [2, 2, 2]]) >>> x.ndim 2 >>> x.shape (2, 3)

You can read it as 2 ‘1-dimensional array’ ([1,1,1] and [2,2,2]) that each of it consist of 3 columns ([1,1,1] and [2,2,2]).

>>> x=np.array([[1,1,1],[2,2,2],[3,3,3]]) >>> x array([[1, 1, 1], [2, 2, 2], [3, 3, 3]])

It’s still 2 dimensional.

>>> x.ndim 2 >>> x.shape (3, 3) >>>