Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly does numpy.exp() do? [closed]

I'm very confused as to what np.exp() actually does. In the documentation it says that it: "Calculates the exponential of all elements in the input array." I'm confused as to what exactly this means. Could someone give me more information to what it actually does?

like image 445
bugsyb Avatar asked Aug 11 '15 21:08

bugsyb


People also ask

What does exp do in NumPy?

The exp function in NumPy is used to compute the exponent of all values present in the given array. e refers to Euler's constant.

Does NumPy have Euler's number?

A quick introduction to the NumPy exponential functionis the mathematical constant that's approximately equal to 2.71828 (AKA, Euler's number). That's it!

What does exp mean in math?

The exponential function, exp(x), calculates the value of e to the power of x, where e is the base of the natural logarithm, 2.718281828... .


1 Answers

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.

like image 85
machine yearning Avatar answered Oct 06 '22 22:10

machine yearning