NumPy is a library used in python to work with arrays. In Python, we have lists that serve the purpose of arrays but they are slow in the process. So to overcome that NumPy was created in 2005 by Travis Oliphant.
Introduction to NumPy arrays
NumPy arrays are 40X faster than normal python lists. So using NumPy will help in faster Data execution and pre-processing.
NumPy arrays are widely used in Data Science, where speed is a major factor.
NumPy arrays are faster than lists as they are stored at one continuous place in memory whereas lists are not stored in a single place.
The array objects in NumPy are called ndarray. We can create ndarray using the array() function.
Here we have aliased NumPy library as np. Aliasing refers to giving a short name like a nickname to any given name. So we can use an aliased name instead of a full name in further code.
In this blog, we have seen how to convert a list to a NumPy array. In further blogs, we will see how to perform operations on the same.
Jeet is a newly graduated student having an interest in the field of Image Processing, Machine Learning, and Data Science. He is always keen to find solutions for real-world problems. Enthusiastic in learning new things and is a passionate Pythonist.