[Numpy-discussion] Problem with np.power in numpy 1.5.1-2
Charles R Harris
charlesr.harris at gmail.com
Tue Apr 5 14:59:39 EDT 2011
On Tue, Apr 5, 2011 at 8:11 AM, M. <infinity.probability at gmail.com> wrote:
> Hi all,
> I've been using numpy without problems - version .1.4.1-5 - until this
> morning, when I upgraded my Debian sid system to numpy 1.5.1-2. A
> function that was working that uses np.power
> def get_far_field(self, chi, n):
> return np.sum(self.an[n,1:self.j] *
> outputs "Warning: overflow encountered in power". I'm using python
> 2.6.6-12. Is this a bug in the numpy library or (more probably) my
> code? If it's in my code, what can be happening? How to debug it?
Hard to say. Some warnings that were disabled by accident in earlier
versions of numpy were enabled in numpy 1.5, so it is possible the problem
has always been there. You might retry with the earlier version and use
seterr to enable the overflow warning just to check. A simple example with
actual numbers that reproduces the warning might also be helpful.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion