What is the advantage of NumPy arrays over lists?

While lists are a highly efficient data structure which allows storing variables of different types, mutation, insertion, deletion, etc. fairly efficiently, they do have some disadvantages compared to the NumPy array.

  1. Lists do not allow vectorised operations like NumPy arrays. In NumPy arrays, you can perform various operations on the elements of the array using the simple operators present in Python which is a feature not allowed by lists. This makes programming using NumPy arrays very convenient.
  2. Since NumPy is built on top of C, programming operations in NumPy arrays are significantly faster compared to Python lists.