def _holes_of_line(self, line=0):
try:
amount_of_holes, hole_id = self.hole_registry[line]
for i in range(amount_of_holes):
self.hole_coord_amount.seek(2 * hole_id)
nr_of_values = unpack(b'<H', self.hole_coord_amount.read(2))[0]
self.hole_adr2data.seek(4 * hole_id)
self.hole_data.seek(unpack(b'<I', self.hole_adr2data.read(4))[0])
yield array([fromfile(self.hole_data, dtype='<i4', count=nr_of_values),
fromfile(self.hole_data, dtype='<i4', count=nr_of_values)])
hole_id += 1
except KeyError:
return
评论列表
文章目录