bug in python/numarray

M

meng

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))
print a.mean()

This works perfectly well in windows but it gave the following error while
running it in debian:
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. Is it a bug in Python or
Numarray? Can someone help me figure it out? BTW, the python version is 2.4.1

Many thanks!
Xiangyi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top