Arithmetic functions

The common arithmetic operators +, -, and * are implicitly linked to the add, subtract, and multiply universal functions, respectively. This means that when you use one of these operators on a NumPy array, the corresponding universal function will get called. Division involves a slightly more complex process. The three universal functions that have to do with array division are divide(), true_divide(), and floor_division(). Two operators correspond to division: / and //.

Get NumPy : Beginner's Guide - Third 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.