Friday , June 18 2021
Home / Data Science / Introduction to NumPy

Introduction to NumPy

1 – Introduction to Numpy

Introduction to NumPy

NumPy (numerical Python) is a library that consists of multidimensional array objects and a set of routines for processing them. NumPy allows you to perform mathematical and logical operations on arrays. This tutorial walks you through the fundamentals of NumPy, including its design and architectue. It also covers array features, indexing types, and other topics.

What is NumPy?

  1. NumPy is a Python module that allows you to interact with arrays.
  2. It also provides functions for working with matrices, fourier transforms, and linear algebra.
  3. Travis Oliphant invented NumPy in 2005. It is an open source project that you are free to use.
  4. Numeric Python is referred to as NumPy.

Why Use NumPy?

  1. We have lists in Python that act as arrays, however they are slow to process.
  2. NumPy aims to provide an array object that is up to 50 times faster than traditional Python lists.
  3. The array object in NumPy is called ndarray.
  4. In data science, when speed and resources are important, arrays are frequently used.

Note: Data Science: is a branch of computer science where we study how to store, use and analyze data for deriving information from it.

Which Language is NumPy written in?

NumPy is a Python library that is partially written in Python, but the majority of the elements that require fast computation are written in C or C++.

Numpy Installation

In [ ]:
!pip install numpy

Import NumPy

In [2]:
import numpy

NumPy is usually imported under the np alias.

In [3]:
import numpy as np

Check Python and Numpy Version

In [4]:
import platform
import numpy as np
print('Python version: ' + platform.python_version())
print('Numpy version: ' + np.__version__)
Python version: 3.6.8
Numpy version: 1.18.5

About Machine Learning

Check Also

Array Manipulation

9 – Manipulate an Array Numpy Array Manipulation¶ In [2]: import numpy as np In [3]: arr …

Leave a Reply

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