NumPy

NumPy is the fundamental package for machine learning with Python. It offers powerful tools including the following:

  • The N-dimensional array ndarray class and several subclasses representing matrices and arrays
  • Various sophisticated array functions
  • Useful linear algebra capabilities

Installation instructions for NumPy are at http://docs.scipy.org/doc/numpy/user/install.html. Alternatively, an easier method is installing it with pip in the command line as follows:

pip install numpy

To install conda for Anaconda users, run the following command line:

conda install numpy

A quick way to verify your installation is to import it in the shell as follows:

>>> import numpy

It's installed nicely if there's no error message.

Get Python Machine Learning By Example - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.