用numpy跑数据,数据量太大,而且numpy没用到gpu,跑得太慢了。换了torch和cupy没发现有替换recarray类似的函数
numpy中
self.data = cp.rec.array(None,
dtype=[('x', cp.int64),
('y', cp.int64),
('p', cp.int64),
('ts', cp.int64)],
shape=(num_events,))