Difference between Numpy Array and List

NumPy Array and List Difference

Numpy Array Python List
It is the core Library of python which is used for scientific computing. The core library of python provides list.
It can contain similar datatypes. It Contains different types of datatypes.
We need to Numpy Library to access Numpy Arrays. It is built-in function of python.
It is Homogeneous. It is both homogeneous and heterogeneous.
In this Element wise operation is possible. Element wise operation is not possible on the list.
By using numpy.array() we can create N-Dimensional array. It is by default 1-dimensional.In some cases, we can create an N-Dimensional list. But it is a long process.
It requires smaller memory consumption as compared to Python List. It requires more memory as compared to Numpy Array.
In this each item is stored in a sequential manner. It stores item in random location of  the memory.
It is faster as compared to list. It is slow as compared to NumPy Array.
It also have some optimism function . It does not have some optimism function .
Fri, 07/30/2021 - 20:29

Authored by

Devanshi, is working as a Data Scientist with iVagus. She has expertise in Python, NumPy, Pandas and other data science technologies.