NumPy for Data Science – Part 3

Arithmetic Operations in NumPy Arrays

In NumPy there are multiple functions which we can use to perform the arithmetic operation, we will be looking them one by one.

The add() function can also be used to perform the same operation.

The subtract() function can also be used to perform the same operation.

The multiply() function can also be used to perform the same operation.

Both the mod() and the remainder() functions return the remainder of the values in the first array corresponding to the values in the second array, and return the results in a new array.

The divide() can also be used to perform the same operation.

Arithmetic Functions

The max() function will return the maximum value of the array and min() will return the minimum value of the array. Sqrt() returns the square root.

Conclusion

In this article we have seen how to perform Arithmetic Operations and Arithmetic Functions. In the next part will be looking into Broadcasting NumPy Arrays.

NumPy for Data Science – Part 1

NumPy for Data Science – Part 2

Popular Posts

Spread the knowledge
 
  

Leave a Reply

Your email address will not be published. Required fields are marked *