template_store.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:spyking-circus-ort 作者: spyking-circus 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号