Q:

Write a NumPy program to calculate inverse sine, inverse cosine, and inverse tangent for all elements in a given array

0

Write a NumPy program to calculate inverse sine, inverse cosine, and inverse tangent for all elements in a given array.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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]

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now