I want to process a big list of uint
numbers (test1) and I do that i chunks of "length". I need them as signed int
and then I need it as absolute length from each pait of even and odd values in this list.
But I want to get rid of two problems:
- it uses a a lot of ram
- it takes ages!
So how could I make this faster? Any trick? I could also use numpy
, no problem in doing so.
Thanks in advance!
test2 = -127 + test1[i:i+length*2048000*2 + 2048000*2*1]
test3 = (test2[::2]**2 + test2[1::2]**2)**0.5