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

5 interesting Numpy array functions you never new you needed

Subtitle Here

NumPy 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. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases. Five interestig Numpy functions are

  • aRange() and LinSpace() to create a sequenced Array
  • Clip() to limit the values in an array
  • Reshape() to give a new shape to an array without changing its data
  • Setdiff1d() to find unique values in an array compared to another
  • Percentile() to compute the nth percentile of the array elements along the specified axis

The recommended way to run this notebook is to click the "Run" button at the top of this page, and select "Run on Binder". This will run the notebook on mybinder.org, a free online service for running Jupyter notebooks.

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

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