data.py 文件源码

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

项目:odin 作者: imito 项目源码 文件源码
def get_all_hdf_dataset(hdf, fileter_func=None, path='/'):
  res = []
  # init queue
  q = queue()
  for i in hdf[path].keys():
    q.put(i)
  # get list of all file
  while not q.empty():
    p = q.pop()
    if 'Dataset' in str(type(hdf[p])):
      if fileter_func is not None and not fileter_func(p):
        continue
      res.append(p)
    elif 'Group' in str(type(hdf[p])):
      for i in hdf[p].keys():
        q.put(p + '/' + i)
  return res
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号