Learn practical skills, build real-world projects, and advance your career

Hands on Numpy

What is Numpy?

NumPy is a python library used for working with arrays. It also has functions for working in domain of linear algebra, fourier transform, and matrices. NumPy stands for Numerical Python.

Let us discuss few functions of numpy->

  • numpy.max : It calculates the maximum element of the array ; if we provide a specific axis in the parameter ,then maximum element along that axis is calculated.

  • numpy.astype : It returns a copy of an array of a datatype coverted into a another valid datatype specified in the parameter.

  • numpy.sum : It calculates the sum of the elements of the array ; if we provide a specific axis in the parameter ,then sum along that axis is calculated.

  • numpy.where : numpy.where(condition,x,y)
    It checks for the condition in the array, if the condition is True, it returns the value 'x', else it returns the value 'y'.

  • numpy.split and numpy.array_split : It splits the given array into any number of sub-arrays.

!pip install jovian --upgrade -q
import jovian
jovian.commit(project='numpy-array-operations')
[jovian] Attempting to save notebook.. [jovian] Updating notebook "aarushi25arora/numpy-array-operations" on https://jovian.ml/ [jovian] Uploading notebook.. [jovian] Capturing environment.. [jovian] Committed successfully! https://jovian.ml/aarushi25arora/numpy-array-operations

Let's begin by importing Numpy and listing out the functions covered in this notebook.