The exponential function is e^x where e is a mathematical constant called Euler's number, approximately 2.718281. This value has a close mathematical relationship with pi and the slope of the curve e^x is equal to its value at every point. np.exp() calculates e^x for each value of x in your input array.

Answer from machine yearning on Stack Overflow
🌐
NumPy
numpy.org › doc › 2.1 › reference › generated › numpy.exp.html
numpy.exp — NumPy v2.1 Manual
The irrational number e is also known as Euler’s number. It is approximately 2.718281, and is the base of the natural logarithm, ln (this means that, if \(x = \ln y = \log_e y\), then \(e^x = y\). For real input, exp(x) is always positive.
🌐
NumPy
numpy.org › doc › stable › reference › generated › numpy.exp.html
numpy.exp — NumPy v2.4 Manual
The irrational number e is also known as Euler’s number. It is approximately 2.718281, and is the base of the natural logarithm, ln (this means that, if \(x = \ln y = \log_e y\), then \(e^x = y\). For real input, exp(x) is always positive.
🌐
Codecademy
codecademy.com › docs › python:numpy › math methods › .exp()
Python:NumPy | Math Methods | .exp() | Codecademy
April 17, 2025 - The exponential function, np.exp(x), returns e^x, where e is Euler’s number with an approximate value of 2.71828. As a part of NumPy, a widely used library for numerical computing in Python, this function is particularly useful in scientific computations where exponential functions are common.
🌐
w3resource
w3resource.com › python-exercises › numpy › python-numpy-math-exercise-31.php
NumPy: Compute e^x, element-wise of a given array - w3resource
Write a NumPy program to compute ex, element-wise of a given array. ... # Importing the NumPy library import numpy as np # Creating an array of float32 type x = np.array([1., 2., 3., 4.], np.float32) # Displaying the original array print("Original array: ") print(x) # Calculating exponential (e^x) for each element of the array x print("\ne^x, element-wise of the said:") r = np.exp(x) print(r)
🌐
Programiz
programiz.com › python-programming › numpy › methods › exp
NumPy exp() (With Examples)
Become a certified Python programmer. Try Programiz PRO! ... The exp() function is used to calculate the exponential values of the elements in an array. import numpy as np array1 = np.array([1, 2, 3, 4, 5])
🌐
Vultr Docs
docs.vultr.com › python › third-party › numpy › exp
Python Numpy exp() - Calculate Exponential | Vultr Docs
November 18, 2024 - Import the NumPy library. Apply the exp() function to a single number. ... This code computes e raised to the power of 2 (e²). The result is approximately 7.389056, showcasing how exp() calculates exponential values.
🌐
GeeksforGeeks
geeksforgeeks.org › numpy-exp-python
numpy.exp() in Python - GeeksforGeeks
March 29, 2023 - numpy.exp() is a function in the Python NumPy library that calculates the exponential value of an input array. It returns an array with the exponential value of each element of the input array.
🌐
NumPy
numpy.org › doc › 1.13 › reference › generated › numpy.exp.html
numpy.exp — NumPy v1.13 Manual
numpy.exp(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'exp'>¶ · Calculate the exponential of all elements in the input array.
Find elsewhere
🌐
NumPy
numpy.org › doc › 2.0 › reference › generated › numpy.exp.html
numpy.exp — NumPy v2.0 Manual
The irrational number e is also known as Euler’s number. It is approximately 2.718281, and is the base of the natural logarithm, ln (this means that, if \(x = \ln y = \log_e y\), then \(e^x = y\). For real input, exp(x) is always positive.
🌐
NumPy
numpy.org › doc › 2.3 › reference › generated › numpy.exp.html
numpy.exp — NumPy v2.3 Manual
The irrational number e is also known as Euler’s number. It is approximately 2.718281, and is the base of the natural logarithm, ln (this means that, if \(x = \ln y = \log_e y\), then \(e^x = y\). For real input, exp(x) is always positive.
🌐
Educative
educative.io › answers › what-is-the-exp-function-in-numpy
What is the exp function in NumPy?
numpy.exp(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'exp'>
🌐
w3resource
w3resource.com › python-exercises › numpy › python-numpy-math-exercise-32.php
NumPy: Calculate exp(x) - 1 for all elements in a given array - w3resource
r2 = np.exp(x) – 1: Here np.exp(x) computes the exponential of x, which means it calculates e raised to the power of the input value x. Here, x is a NumPy array containing values 1.0, 2.0, 3.0, and 4.0, and the output of np.exp(x) is also a NumPy array, where each element of the array is e raised to the power of the corresponding element of x...
🌐
Spark By {Examples}
sparkbyexamples.com › home › numpy › how to use numpy exponential function
How to Use NumPy Exponential Function - Spark By {Examples}
March 27, 2024 - For instance, you’ve imported NumPy and then used the np.exp() function to calculate the exponential value of a single element (in this case, the value 3), and the result is printed, which is approximately 20.085536.
🌐
AskPython
askpython.com › home › numpy exp – a complete guide
NumPy exp - A Complete Guide - AskPython
February 16, 2023 - The exp method in NumPy is a function that returns the exponential of all the elements of the input array. This means that it calculates e^x for each x in the input array.
🌐
GeeksforGeeks
geeksforgeeks.org › computing-ex-element-wise-in-a-numpy-array
Computing e^x element-wise in a NumPy array | GeeksforGeeks
August 19, 2020 - Original array: [1 3 5 7] Printing e ^ x, element-wise of the said: [2.718281828459045, 20.085536923187668, 148.4131591025766, 1096.6331584284585] ... In this article, we are going to see how to count the number of non-NaN elements in a NumPy array in Python.
🌐
SciPy
docs.scipy.org › doc › numpy-1.10.1 › reference › generated › numpy.exp.html
numpy.exp — NumPy v1.10 Manual
Calculate the exponential of all elements in the input array. ... Calculate exp(x) - 1 for all elements in the array.
🌐
datagy
datagy.io › home › numpy › numpy exponential: using the numpy.exp() function
NumPy Exponential: Using the NumPy.exp() Function • datagy
December 30, 2022 - In this tutorial, you’ll learn how to use the NumPy exponential function, np.exp(). The function raises the Euler’s constant, e, to a given power. Because Euler’s constant has many practical applications in science, math, and deep learning, being able to work with this function in meaningful ways is an asset for any Python ...
🌐
NumPy
numpy.org › doc › stable › reference › generated › numpy.expm1.html
numpy.expm1 — NumPy v2.4 Manual
numpy.expm1(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature]) = <ufunc 'expm1'>#
🌐
NumPy
numpy.org › doc › 1.15 › reference › generated › numpy.exp.html
numpy.exp — NumPy v1.15 Manual
numpy.exp(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'exp'>¶ · Calculate the exponential of all elements in the input array.