June 2018
Beginner to intermediate
168 pages
3h 40m
English
Arithmetic with NumPy arrays is always done component-wise. This means that, if we have two matrices that have equal shapes, an operation such as addition is done by matching corresponding components in the two matrices and adding them. This is true for any arithmetic operation, be it addition, subtraction, multiplication, division, powers, or even logical operators.
Let's see an example. First, we create two arrays of random data:


While I explain these ideas in terms of arithmetic involving two arrays, ...
Read now
Unlock full access