Introduction to NumPy Arrays

NumPy: Numerical Python

  • 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.
  • If you dont know how to make list in python, please visit this blog to know about python lists

Submit a Comment

Your email address will not be published. Required fields are marked *

Footer Logo

Subscribe

Select Categories