Your Turn

I hope I convinced you that numpy is an excellent toolset when it comes to number crunching. It treats vectors and matrices as first-class citizens; provides vectorized arithmetic, logical, and other operations; and provides a means for data reshaping, ordering, and aggregation. It even supplies a weird creature called nan, which is a number that is not a number. Can you tame some of the computationally intensive projects with numpy?

Array Differentiator*

Partial sums are a rough equivalent of an integral. In fact, calculus defines an integral as an infinite sum of infinitesimal elements. Partial differences arri+1-arri are a rough equivalent of a derivative. numpy doesn’t provide a tool for calculating partial array differences. ...

Get Data Science Essentials in 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.