def remove(self, indices):
if not np.iterable(indices):
indices = [indices]
self._open('r+')
for index in indices:
assert index in indices
self.h5_file.pop('waveforms/%d' % index)
self.h5_file.pop('amplitudes/%d' % index)
channels = self.h5_file.pop('channels')
times = self.h5_file.pop('times')
indices = self.h5_file.pop('indices')
to_remove = np.where(indices == index)[0]
self.h5_file['channels'] = np.delete(channels, to_remove)
self.h5_file['indices'] = np.delete(indices, to_remove)
self.h5_file['times'] = np.delete(times, to_remove)
self._close()
return
template_store.py 文件源码
python
阅读 34
收藏 0
点赞 0
评论 0
评论列表
文章目录