Chapter 3: High-Speed Scientific Computing Using NumPy

This chapter introduces us to NumPy, a high-speed Python library for matrix calculations. Most data science/algorithmic trading libraries are built upon NumPy's functionality and conventions.

In this chapter, we are going to cover the following key topics:

  • Introduction to NumPy
  • Creating NumPy n-dimensional arrays (ndarrays)
  • Data types used with NumPy arrays
  • Indexing of ndarrays
  • Basic ndarray operations
  • File operations on ndarrays

Technical requirements

The Python code used in this chapter is available in the Chapter03/numpy.ipynb notebook in the book's code repository.

Introduction to NumPy

Multidimensional heterogeneous arrays can be represented in Python using lists. A list is a 1D array, ...

Get Hands-On Financial Trading with Python 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.