473,495 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

bug in python/numarray

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

Aug 2 '05 #1
0 939

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1902
by: Tim Rowe | last post by:
Does numarray-0.5.win32-py2.2.exe work with Python 2.3? If not, is there a version that will? Tia, Tim
3
1383
by: Ognen Duzlevski | last post by:
Hi, can someone explain how to change a value within an array from a C function? For example, I have the following array: scoremat = zeros((10,10)) and the following C function: PyObject...
4
3649
by: Faheem Mitha | last post by:
Dear People, I have the current modest goal. Given a user defined class, I want to creata an array of instances of that class. Consider the following class. class cell: def...
1
1963
by: youngdubliner | last post by:
I'm having a problem ........ I've stripped all my code to help isolate the problem. Its seems to be with importing numarray when python is embedded in C. I have a simple C program it Opens...
22
3194
by: Kamilche | last post by:
I've looked at a few alternatives for encryption with Python, and didn't come up anything very speedy. I've written an encryption algorithm in pure Python that can process 22 megs of data a...
47
3605
by: Michael Scarlett | last post by:
There is an amazing article by paul graham about python, and an even better discussion about it on slashdot. The reason I point this out, is the more I read both articles, the more I realised how...
44
2475
by: Iwan van der Kleyn | last post by:
Please ignore if you are allergic to ramblings :-) Despite a puritan streak I've always tried to refrain from language wars or syntax bickering; call it enforced pragmatism. That's the main...
1
264
by: J | last post by:
Hi everyone, I have posted a question on this topic before and already received some useful advice. I am basically trying to package python with an App that embedds the interpretor. I am also...
5
1330
by: D.Hering | last post by:
Generally, what sort of compatibility problems should I expect if I were to replace 2.4.1 with 2.5 alpha (current cvs dist)? I'm working under gentoo linux 2.6. Specifically, should I expect any...
0
7160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.