Array Operations

In this lesson, we will learn about scalar and element-wise array operations.

We'll cover the following

As we have seen in previous lessons, Python vectors and matrices are not equivalent to mathematical matrices, but they are similar in some ways.

Keep in mind that certain Python vector and matrix operations differ from the mathematical vector and matrices.

Scalar operations #

We can use the usual arithmetic operators to multiply, add, subtract, and divide arrays with scalar numbers. These operations will be performed individually on each element.

Let’s see the implementation for vectors below:

Get hands-on with 1400+ tech skills courses.