numeric module

shama.bell at gmail.com shama.bell at gmail.com
Fri Apr 1 12:38:10 EST 2005


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 >> 4
    bi = crc & 0xFL
    print wi
    print bi
    print tbl[wi][bi]


def testme():
    val = 0xFFFFFFL
    val >>= 23
    return val

        
if __name__ == '__main__':
    test()

Thanks,
-SB




More information about the Python-list mailing list