Write a NumPy program to add, subtract, multiply, divide arguments element-wise.Sample elements: 4.0, 1.2
import numpy as np print("Add:") print(np.add(1.0, 4.0)) print("Subtract:") print(np.subtract(1.0, 4.0)) print("Multiply:") print(np.multiply(1.0, 4.0)) print("Divide:") print(np.divide(1.0, 4.0))
Sample Output:
Add: 5.0 Subtract: -3.0 Multiply: 4.0 Divide: 0.25
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer