less than 1 minute read

NumPy is a Python extension module and fundamental package for scientific computing . The arrays facilitate advanced mathematical and other types of operations on large numbers of data. The operations are executed more efficiently and with less code than using Python. It provides fast and efficient operations on arrays.

Advantages:

  • Python’s lists are efficient general-purpose containers. They support efficient insertion, deletion, appending, and concatenation and Python’s list comprehensions make them easy to construct and manipulate.

  • They have certain limitations: they don’t support Vectorized Operations like addition and multiplication.

  • NumPy is not just more efficient; it is also more convenient. You get a lot of vector and matrix operations for free, which sometimes allow one to avoid unnecessary work. And they are also efficiently implemented using less code, this mean that you will use less memory.

  • NumPy array is faster and You get a lot built in with NumPy, fast searching, basic statistics, linear algebra, histograms, etc.

References

What advantages do NumPy arrays offer over (nested) Python lists?

Python list vs. Numpy arrays