NumPy and SciPy

Until now, you have seen numerous examples of NumPy usage and only a few of SciPy. NumPy has array data type, which allows you to perform various array operations, such as sorting and reshaping.

NumPy has some numerical algorithms that can be used for tasks such as calculating norms, eigenvalues, and eigenvectors. However, if numerical algorithms are your focus, you should ideally use SciPy, as it includes a more comprehensive algorithm set, as well as the latest versions of the algorithms. SciPy has a lot of useful subpackages for certain kinds of analysis.

The following list will give you an overall idea of the subpackages:

  • Cluster: This subpackage includes clustering algorithms. It has two submodules, vq and hierarchy ...

Get Mastering Numerical Computing with NumPy 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.