speed of numpy.power()?

Peter Pearson ppearson at nowhere.invalid
Wed Aug 25 13:39:46 EDT 2010


On Wed, 25 Aug 2010 06:59:36 -0700 (PDT), Carlos Grohmann wrote:
	>
> I'd like to hear from you on the benefits of using numpy.power(x,y)
> over (x*x*x*x..)
>

Using the "dis" package under Python 2.5, I see that
computing x_to_the_16 = x*x*x*x*x*x*x*x*x*x*x*x*x*x*x*x uses
15 multiplies.  I hope that numpy.power does it with 4.

-- 
To email me, substitute nowhere->spamcop, invalid->net.



More information about the Python-list mailing list