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

Random? Not Really!

Pseudo-Random Sampling using Numpy

Numerical-Python, or as we call it Numpy, is a library, basically used to create and manipulate arrays in Python, upto 50 times faster than normal python lists, as the code is partially written in C or C++.

  • Choices

    • random.choice(a, size, replace, p)
  • Triangular

    • random.triangular(low, high, mode)
  • Chi-Square

    • numpy.random.chisquare(df, size)
  • Normal (Gausian)

    • numpy.random.normal(loc=0.0, scale=1.0, size=None)
  • Seed

    • random.seed(seed)

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] Attempting to save notebook.. [jovian] Please enter your API key ( from https://jovian.ml/ ): API KEY: ········ [jovian] Updating notebook "dharmikmohit/numpy-array-operations" on https://jovian.ml/ [jovian] Uploading notebook.. [jovian] Capturing environment.. [jovian] Committed successfully! https://jovian.ml/dharmikmohit/numpy-array-operations

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