Write a NumPy program to calculate inverse sine, inverse cosine, and inverse tangent for all elements in a given array.
import numpy as np x = np.array([-1., 0, 1.]) print("Inverse sine:", np.arcsin(x)) print("Inverse cosine:", np.arccos(x)) print("Inverse tangent:", np.arctan(x))
Sample Output:
Inverse sine: [-1.57079633 0. 1.57079633] Inverse cosine: [3.14159265 1.57079633 0. ] Inverse tangent: [-0.78539816 0. 0.78539816]
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