bug in python/numarray

Discussion in 'Python' started by meng@are.berkeley.edu, Aug 2, 2005.

  1. Guest

    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, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Rowe

    Numarray for Python 2.3

    Tim Rowe, Jul 16, 2003, in forum: Python
    Replies:
    2
    Views:
    319
    Tim Rowe
    Jul 16, 2003
  2. Eugene Druker

    numarray.linear_algebra.eigenvectors bug ?

    Eugene Druker, Sep 19, 2003, in forum: Python
    Replies:
    1
    Views:
    318
    John J. Lee
    Sep 20, 2003
  3. Marco Bubke

    numarray bug or my?

    Marco Bubke, Feb 23, 2004, in forum: Python
    Replies:
    4
    Views:
    314
    Marco Bubke
    Feb 24, 2004
  4. Ray Schumacher

    Help req: IDL to Python, numarray-Numeric

    Ray Schumacher, Aug 28, 2004, in forum: Python
    Replies:
    2
    Views:
    460
  5. Xiangyi

    bug in numarray?

    Xiangyi, Sep 7, 2005, in forum: Python
    Replies:
    2
    Views:
    248
    Colin J. Williams
    Sep 9, 2005
Loading...

Share This Page