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

Author

  • Naveen Pandey Data Scientist Machine Learning Engineer

    Naveen Pandey has more than 2 years of experience in data science and machine learning. He is an experienced Machine Learning Engineer with a strong background in data analysis, natural language processing, and machine learning. Holding a Bachelor of Science in Information Technology from Sikkim Manipal University, he excels in leveraging cutting-edge technologies such as Large Language Models (LLMs), TensorFlow, PyTorch, and Hugging Face to develop innovative solutions.

    View all posts
Spread the knowledge
 
  

Leave a Reply

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