Numpy arctan() method

This function is used to calculate the inverse tangent of the array elements.

Syntax

snippet
numpy.arcttan(array, out)

Parameters

  1. array: these are the array elements of which, the inverse tangent values are to be calculated.
  2. Out: It is the shape of the output array.

Return

It returns an array containing the inverse tangent values for all the array elements, x.

Example

snippet
import numpy as np 

arr = [0, 0.3, -1] 
print ("Input array : \n", arr) 

arctan_val = np.arctan(arr) 
print ("\nInverse tan values : \n", arctan_val)

Output:

Output
Input array : [0, 0.3, -1] Inverse tan values : [ 0. 0.29145679 -0.78539816]
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +