आर्कटान एक बहुमान फलन है:प्रत्येक x के लिए असीम रूप से कई संख्याएँ z होती हैं जैसे कि थैतन (z) =x। सम्मेलन z को वापस करना है जिसका काल्पनिक भाग [-pi/2, pi/2] में है। इनवर्सहाइपरबोलिक स्पर्शरेखा को अतान या तन्ह^-1 के रूप में भी जाना जाता है।
सरणी तत्वों के प्रतिलोम हाइपरबोलिक स्पर्शरेखा की गणना करने के लिए, numpy.arctanh() विधि का उपयोग करेंPython Numpy में। विधि x के समान आकार की सरणी लौटाती है। यह एक अदिश है यदि x एक अदिश है। पहला पैरामीटर, x इनपुट सरणी है। दूसरा और तीसरा पैरामीटर वैकल्पिक हैं।
दूसरा पैरामीटर एक ndarray है, एक स्थान जिसमें परिणाम संग्रहीत किया जाता है। यदि प्रदान किया गया है, तो इसका एक आकार होना चाहिए जिससे इनपुट प्रसारित हो। यदि प्रदान नहीं किया गया है या कोई नहीं, एक ताजा आवंटित सरणी लौटा दी जाती है।
तीसरा पैरामीटर यह है कि स्थिति इनपुट पर प्रसारित की जाती है। उन स्थानों पर जहां स्थिति सही है, आउट ऐरे को ufunc परिणाम पर सेट किया जाएगा। कहीं और, आउट ऐरे अपना मूल मान बनाए रखेगा।
कदम
सबसे पहले, आवश्यक पुस्तकालय आयात करें -
import numpy as np
Numpy में array() विधि का उपयोग करके एक सरणी बनाएं -
arr = np.array((0, 0.2, 0.3, 0.5, 0.11))
हमारी सरणी प्रदर्शित करना -
print("Array...\n",arr) डेटाटाइप प्राप्त करें -
print("\nArray datatype...\n",arr.dtype)
ऐरे के आयाम प्राप्त करें -
print("\nArray Dimensions...\n",arr.ndim) ऐरे के तत्वों की संख्या प्राप्त करें -
print("\nNumber of elements in the Array...\n",arr.size) सरणी तत्वों के प्रतिलोम अतिपरवलयिक स्पर्शरेखा को खोजने के लिए, numpy.arctanh() विधि का उपयोग करेंपायथन नम्पी -
मेंprint("\nResult...",np.arctanh(arr)) उदाहरण
import numpy as np
# To compute the inverse Hyperbolic tangent of array elements, use the numpy.arctanh() method in Python Numpy
# The method returns the array of the same shape as x. This is a scalar if x is a scalar.
# The 1st parameter, x is input array
print("Get the Trigonometric inverse Hyperbolic tangent of array elements...")
# Create an array using the array() method in Numpy
arr = np.array((0, 0.2, 0.3, 0.5, 0.11))
# Display the array
print("\nArray...\n", arr)
# Get the type of the array
print("\nOur Array type...\n", arr.dtype)
# Get the dimensions of the Array
print("\nOur Array Dimensions...\n",arr.ndim)
# Get the number of elements in the Array
print("\nNumber of elements...\n", arr.size)
# To find the inverse hyperbolic tangent of the array elements, use the numpy.arctanh() method in Python Numpy
print("\nResult...",np.arctanh(arr)) में numpy.arctanh() विधि का उपयोग करें। आउटपुट
Get the Trigonometric inverse Hyperbolic tangent of array elements... Array... [0. 0.2 0.3 0.5 0.11] Our Array type... float64 Our Array Dimensions... 1 Number of elements... 5 Result... [0. 0.20273255 0.3095196 0.54930614 0.11044692]