How does python (or numpy/scipy) do exponentiation? If I do x**p,
where p is some positive integer, will it compute x*x*...*x (p times),
or will it use logarithms?
-gideon
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
On Fri, Jul 25, 2008 at 1:24 PM, Gideon Simpson [EMAIL PROTECTED] wrote:
How does python (or numpy/scipy) do exponentiation? If I do x**p,
where p is some positive integer, will it compute x*x*...*x (p times),
or will it use logarithms?
Here are some examples:
np.array([[1,2], [3,4]])**2
On Fri, Jul 25, 2008 at 1:32 PM, Keith Goodman [EMAIL PROTECTED] wrote:
On Fri, Jul 25, 2008 at 1:24 PM, Gideon Simpson [EMAIL PROTECTED] wrote:
How does python (or numpy/scipy) do exponentiation? If I do x**p,
where p is some positive integer, will it compute x*x*...*x (p times),
or will it
Fri, 25 Jul 2008 16:24:35 -0400, Gideon Simpson wrote:
How does python (or numpy/scipy) do exponentiation? If I do x**p, where
p is some positive integer, will it compute x*x*...*x (p times), or will
it use logarithms?
For floats it will call operating system's pow, which supposedly is