Learn practical skills, build real-world projects, and advance your career
!pip install jovian --upgrade -q
import jovian

Basic Numpy as I understood

Numpy is short for numerical python. Everything in numpy is done through arrays. So what is an array? An array is a data structure, of which all the elements have same data type. When we talk in terms of computer programming, we should keep in mind that an array is a block of memory space having, a number of small memory blocks within it, and all these memory blocks, covered by the array have data of same data type. Numpy is written in C, so it is about 100 times faster than the python. Therefore it is advisable to use numpy library for mathematical operations in python to achieve speed. Python is slower due to Global Interpreter Lock (GIL), and Numpy is not affected by GIL, that is also the reason why numpy should be preferred for heavy mathematical operations. The GIL issue is intentionally not being elaborated here.

How we do it in Numpy

Numpy is a seperate python library, and we need to install it and then import it in our program to use it. We pip install the numpy and then import it by import command. It is also customary to import numpy by aliasing it as np as follows:

!pip install numpy --upgrade
Collecting numpy Downloading numpy-1.19.4-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB) |████████████████████████████████| 14.5 MB 4.6 MB/s eta 0:00:01 Installing collected packages: numpy Attempting uninstall: numpy Found existing installation: numpy 1.19.2 Uninstalling numpy-1.19.2: Successfully uninstalled numpy-1.19.2 Successfully installed numpy-1.19.4