bug in python/numarray
Terry Reedy
tjreedy at udel.edu
Tue Aug 2 15:16:25 EDT 2005
<meng at are.berkeley.edu> wrote in message
news:5.1.1.5.2.20050802103138.04c79d50 at are.berkeley.edu...
> Hi, there,
>
> I got different results by running the same lines of code on windows and
> debian. Here is the code:
>
> a = kroneckerproduct(ones((4195,1)), identity(12))
I don't know what this does, but wonder if it uses a lot of memory.
> print a.mean()
>
> This works perfectly well in windows but it gave the following error
> while
> running it in debian:
Were you running on one dual boot machine (with the same memory available
to each OS) or on two different machines, especially with different amounts
of memory.
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/usr/lib/python2.4/site-packages/numarray/numarraycore.py", line
> 1137, in mean
> return self.sum()/(self.nelements()*1.0)
> File "/usr/lib/python2.4/site-packages/numarray/numarraycore.py", line
> 1133, in sum
> return ufunc.add.reduce(ufunc.add.areduce(self, type=type).flat,
> type=type)
> IndexError: too many indices.
>
> But if I reduce the number 4195 to 419, it works.
Try using binary search (ie, try 2200 next) to pin down the exact breakdown
point (as in 2123 works, 2124 does not) if there is one, or whether the
breakdown is run dependent. Unload other apps and non-essential background
process to see if that changes anything
> Is it a bug in Python or Numarray?
If it is not a resource issue, assume the latter since it crashed in
Numarray. I think its maintainers would want to know about it.
Terry J. Reedy
More information about the Python-list
mailing list