打开大行李架时查看内存错误

2024-04-26 07:52:25 发布

您现在位置:Python中文网/ 问答频道 /正文

当打开由pytables代码生成的大carray时,viTables和HDFView都会返回内存错误。看起来,观看者试图将整个carray读入内存,但失败了。是真的是这样还是我误会了什么?在

直接从python脚本打开carray,尝试打印整个carray也会产生内存错误。在

使用carray创建hdf5,如下所示:

import tables as pytab
pytfile = pytab.File("bigcarray.hdf",'w','Test of Big CArray')
grpData = pytfile.createGroup('/','data')
pytfile.createCArray(grpData,'TestData',pytab.Float64Atom(), (10000,10000))
pytfile.close()

在viTable或HDFView中打开都会导致内存错误问题。在


Tags: 内存import脚本tables错误pytables代码生成hdf5