Skip to content

Latest commit

 

History

History
 
 

README.md

NumPy Random Number Generation

This folder contains supplementary code for the Real Python tutorial on NumPy's pseudo-random number generator. You can copy the code examples, or continue your learning by experimenting more with them.

Setup

Create and activate a virtual environment, then install the requirements:

$ python -m venv venv
$ source venv/bin/activate
(venv) $ python -m pip install -r requirements.txt -c constraints.txt

For most of the examples, you only need a version of NumPy>=1.17 installed, but you'll use matplotlib and scipy in the final section of the tutorial.

Usage

After creating and activating your virtual environment, and installing the dependencies, you should be able to run each individual file normally:

(venv) $ python filename.py

You can find more information and context on the code blocks in Using the NumPy Random Number Generator.