Re: numeric module

2005-04-01 Thread David M. Cooke
"coffeebug" <[EMAIL PROTECTED]> writes: > I cannot import "numarray" and I cannot import "numeric" using python > 2.3.3 numarray and Numeric are separate modules available at http://numpy.sourceforge.net/ If you're doing anything numerical in Python, you'll want them :-) -- |>|\/|< /-

Re: numeric module

2005-04-01 Thread David M. Cooke
[EMAIL PROTECTED] writes: > Hello, > What's the problem with this code? I get the following error message: > > File "test.py", line 26, in test > print tbl[wi][bi] > IndexError: index must be either an int or a sequence > > ---code snippet > > from Numeric import * > tbl = zeros((32, 16))

Re: numeric module

2005-04-01 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What's the problem with this code? I get the following error message: 2.4 or earlier? > File "test.py", line 26, in test >print tbl[wi][bi] > IndexError: index must be either an int or a sequence Longs are not ints; message impl

Re: numeric module

2005-04-01 Thread coffeebug
I cannot import "numarray" and I cannot import "numeric" using python 2.3.3 Where would I find an equivalent definition for zeros()? Anyway, is there supposed to be something that sets the value of elements of tbl to values other than zero? Not that the question has anything to do with Shama's p

Re: numeric module

2005-04-01 Thread shama . bell
Thanks Steve. There's a problem with Numeric array. I tried with numarray and it works fine. -SB -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric module

2005-04-01 Thread Steven Bethard
[EMAIL PROTECTED] wrote: Hello, What's the problem with this code? I get the following error message: File "test.py", line 26, in test print tbl[wi][bi] IndexError: index must be either an int or a sequence ---code snippet from Numeric import * tbl = zeros((32, 16)) def test(): val = t

Re: numeric module

2005-04-01 Thread shama . bell
The table initializes to a 2 dimensional with zeros. -SB -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric module

2005-04-01 Thread coffeebug
I don't know much here...but is there an assumption you're making about the machine word size to be greather than 24 bits? Also, more to the point, does the function zeros() instantiate a two-dimensional table? If so, does it populate the table with any values? The error looks like tbl[ ][ ] doesn

Re: numeric module

2005-04-01 Thread shama . bell
In function test(), Read wi and bi as: wi = val >> 4 bi = val & 0xFL -SB -- http://mail.python.org/mailman/listinfo/python-list

numeric module

2005-04-01 Thread shama . bell
Hello, What's the problem with this code? I get the following error message: File "test.py", line 26, in test print tbl[wi][bi] IndexError: index must be either an int or a sequence ---code snippet from Numeric import * tbl = zeros((32, 16)) def test(): val = testme() wi = crc