Home About
Courses Concepts Tools
GitHub

NumPy

NumPy is described on its website as "the fundamental package for scientific computing with Python." While this may be true, in ORIE we tend to use but a small subset of these scientific capabilites; mostly, we use NumPy for a small number of its linear algebra capabilities, its wide array of random number generators, and its interoperability with MatPlotLib and pandas.

Installation

You can install NumPy with the following command in your terminal: python -m pip install numpy. If that doesn't work, or you want to use something else, you can follow this guide on their website: NumPy website.

If you don't have pip installed, read instructions on installing it here: pip website.

If you don't have Python installed, download it here (Python website), or use Anaconda instead.

Usage

Documentation on NumPy can be found here: https://numpy.org/doc/stable/reference/index.html. This documentation is rather verbose, so it's probably better to just look up "NumPy + <what you want to do>", or to check out the examples linked below to see if anything there is similar to what you're looking for.

Examples

Examples of NumPy can be found on this wiki page, under "Using Modules > Numpy/Scipy Examples": https://orpy.wiki/concepts/index.html.