On Di, 2014-02-18 at 11:44 +0000, Sturla Molden wrote:
> Robert Kern <robert.k...@gmail.com> wrote:
> 
> > We're talking about numpy.power(), not just ndarray.__pow__(). The
> > equivalence of the two is indeed an implementation detail, but I do
> > think that it is useful to maintain the equivalence. If we didn't, it
> > would be the only exception, to my knowledge.
> 
> But in this case it makes sence.
> 
> math.pow(2,2) and 2**2 does not do the same. That is how Python behaves.
> 

To be honest, that comparison only makes half sense to me. `math` are
all float (double precision) functions, basically you could just as well
call the library `fmath`...

I am -0.5 right now. `__pow__` already has special behaviour as opposed
to `np.power`, but these are for speed and don't change behaviour. T
he `uint` idea seems to just make things more complicated. If I am aware
of uint vs int, I am already aware I can just cast to float.

- Sebastian

> Sturla
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 


_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to