Concept

NumPy Arithmetic Functions

First, import numpy as np

  • np.add() adds elements from two arrays
  • np.multiply() multiples elements from two arrays
  • np.power() elements from first array are to powers from second array
  • np.subtract() subtracts elements from two arrays
  • np.true_divide() uses true division to divide elements from two arrays
  • np.floor_divide() divides elements from two arrays and returns the floor value of the quotient (1 / 3 returns 0)
  • np.mod() returns the remainder of the division between two arrays

0

1

Updated 2021-07-26

Tags

Python Programming Language

Data Science