[Numpy-discussion] Re: indexing problem

Gary Ruben gruben at bigpond.net.au
Mon Feb 13 18:19:01 EST 2006

Tim Hochberg wrote:
> However, I'm not convinced this is a good idea for numpy. This would 
> introduce a discontinuity in a**b that could cause problems in some 
> cases. If, for instance, one were running an iterative solver of some 
> sort (something I've been known to do), and b was a free variable, it 
> could get stuck at b = 2 since things would go nonmonotonic there.

I don't quite understand the problem here. Tim says Python special cases 
integer powers but then talks about the problem when b is a floating 
type. I think special casing x**2 and maybe even x**3 when the power is 
an integer is still a good idea.

Gary R.

More information about the NumPy-Discussion mailing list