Re: creating record arrays using memmap

Nov. 17, 2003
8:25 p.m.
Yes, it is possible to create a record array with memmap. The trick is to use the constructor, instead of the "array" function:
from numarray import memmap, records m=memmap.open('xxx.txt') r2=records.RecArray(m[0:18],formats='i2,f4',shape=3)
Notice that you also need to "calculate" the slice (you must use the slice even if you are mapping the whole file). JC Hsu
7756
Age (days ago)
7756
Last active (days ago)
0 comments
1 participants
participants (1)
-
JC Hsu