NumPy in python
NumPy stands for Numerical Python.
NumPy is a python library used for working with arrays. It also has functions for working in domain of linear algebra, fourier transform, and matrices. NumPy was created in 2005 by Travis Oliphant. It is an open source project and you can use it freely. NumPy stands for Numerical Python. In Python we have lists that serve the purpose of arrays, but they are slow to process.
NumPy aims to provide an array object that is up to 50x faster that traditional Python lists. The array object in NumPy is called ndarray, it provides a lot of supporting functions that make working with ndarray very easy. Arrays are very frequently used in data science, where speed and resources are very important.
Here are some uses of numpy in python. Now let’s see some of its uses running code in Jupyter Notebook.
Firstly, we import library.
Using array method to convert list to array:
Using zeros method:
Using ones method :
Using randint method:
To find max number in array:
To find min number in array:
Using argmax method in array:
To find mean value in array:
Using arrange method:
To shape array:
Hi readers! here are some uses of numpy. Don’t forget to clap if you like it.
Thank You.