Back Navigation Next Navigation External Packages (page 13 of 38)

We can perform element-wise operations such as addition, subtraction, multiplication, and division without needing to loop over the data. Element-wise operations perform operations on each element, which is often done using two arrays of equal sizes where the operation is between the same index positions in both arrays. The below example only uses two single dimensional arrays. However, we are not limited to single dimensional arrays and not limited to just using two arrays to perform these element-wise operations.

element wise operations