Hi all,
I'd like to hear from you on the benefits of using numpy.power(x,y)
over (x*x*x*x..)
I looks to me that numpy.power takes more time to run.
cheers
Carlos
--
http://mail.python.org/mailman/listinfo/python-list
On 25/08/2010 14:59, Carlos Grohmann wrote:
Hi all,
I'd like to hear from you on the benefits of using numpy.power(x,y)
over (x*x*x*x..)
I looks to me that numpy.power takes more time to run.
cheers
Carlos
Measure it yourself using the timeit module.
Cheers.
Mark Lawrence.
--
Carlos Grohmann carlos.grohm...@gmail.com writes:
I'd like to hear from you on the benefits of using numpy.power(x,y)
over (x*x*x*x..)
I looks to me that numpy.power takes more time to run.
You can use math.pow, which is no slower than repeated multiplication,
even for small exponents.
On Wed, Aug 25, 2010 at 10:59 PM, Carlos Grohmann
carlos.grohm...@gmail.com wrote:
Hi all,
I'd like to hear from you on the benefits of using numpy.power(x,y)
over (x*x*x*x..)
Without more context, I would say None if x*x*x*x*... works and you
are not already using numpy. The point of numpy
On 25 ago, 12:40, David Cournapeau courn...@gmail.com wrote:
On Wed, Aug 25, 2010 at 10:59 PM, Carlos Grohmann
Thanks David and Hrvoje. That was the feedback I was looking for.
I am using numpy in my app but in some cases I will use math.pow(),
as some tests with timeit showed that numpy.power
On 8/25/10 8:59 AM, Carlos Grohmann wrote:
Hi all,
I'd like to hear from you on the benefits of using numpy.power(x,y)
over (x*x*x*x..)
I looks to me that numpy.power takes more time to run.
You will want to ask numpy questions on the numpy mailing list:
http://www.scipy.org/Mailing_Lists
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
Peter Pearson wrote:
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 =