非常に大きなベクトル配列をファイルに保存する必要があります。サイズは 1e48 まで大きくなる可能性があります。これをファイルに保存し、一連のデータ (一度に 8 つの要素など) を順番に読み取り、操作し、操作されたデータをファイルに保存する方法。配列要素は倍精度/さらに大きな 10 進数です。コードは Python である可能性があります。誰か提案はありますか?
1 に答える
1
I'm voluntarily putting aside the fact that you have a really big dataset. A good (actually not so bad) strategy would be NOT to load the entire file using for example :
array = f.readlines()
but rather play with the cursor and load 8 elements at a time :
line = f.readline()
while line:
#Do stuff here
Here I'm assuming that you have each element on a different line.
于 2013-01-10T16:45:23.200 に答える