...

/

Array Operations

Array Operations

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

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:

Access this course and 1400+ top-rated courses and projects.