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

Some Smart and Interesting Operations on Numpy.

What is NumPy?

  • Numpy is a general-purpose array-processing package. It provides a high-performance multidimensional array object, and tools for working with these arrays. It is the fundamental package for scientific computing with Python.

  • Besides its obvious scientific uses, Numpy can also be used as an efficient multi-dimensional container of generic data.

Why Use Numpy ?

  • In Python we have lists that serve the purpose of arrays, but they are slow to process.

  • NumPy aims to provide an array object that is up to 50x faster that traditional Python lists.

  • The array object in NumPy is called ndarray, it provides a lot of supporting functions that make working with ndarray very easy.

  • Arrays are very frequently used in data science, where speed and resources are very important.

Here are 5 operations on NumPy which are interesting to learn:

  • np.partition()
  • np.extract()
  • np.intersect1d()
  • np.flip()
  • np.count_nonzero()
!pip install jovian --upgrade -q
import jovian
jovian.commit(project='numpy-smart-and-interesting-array-operations')
[jovian] Attempting to save notebook.. [jovian] Creating a new project "ashu121343mishra/numpy-smart-and-interesting-array-operations" [jovian] Uploading notebook.. [jovian] Capturing environment.. [jovian] Committed successfully! https://jovian.ml/ashu121343mishra/numpy-smart-and-interesting-array-operations

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