Efficient coding advice?

Johann Hibschman johann at physics.berkeley.edu
Tue Apr 25 12:22:33 EDT 2000


Johann Hibschman writes:

Ooops.  Badness.  Left out a line.

> Try:

> ords = map(ord, data)            # take the ord of all the chars

ords = Numeric.array(ords)

> ords.shape = (nframes/2, 2)      # reshape the array in place

...otherwise this will fail.

> left  = ords[:,0]                # pick out individual columns
> right = ords[:,1]

-- 
Johann Hibschman                           johann at physics.berkeley.edu



More information about the Python-list mailing list