class_docstr: Storage in a HDF5 file.
  
  Stores previously drawn points above some likelihood contour,
  so that they can be reused in another run.
  
  The format is a HDF5 file, which grows as needed.
class_docstr_tok: ["Storage","in","a","HDF5","file",".","Stores","previously","drawn","points","above","some","likelihood","contour",",","so","that","they","can","be","reused","in","another","run",".","The","format","is","a","HDF5","file",",","which","grows","as","needed","."]
docstr: Load and append to storage at filepath.
  
  File contains *ncols* columns in 'points' dataset (Lmin, L, and others).
  h5_file_args are passed on to hdf5.File.
docstr_tok: ["Load","and","append","to","storage","at","filepath",".","File","contains","*","ncols","*","columns","in","'points","'","dataset","(","Lmin",",","L",",","and","others",")",".","h5_file_args","are","passed","on","to","hdf5.File","."]
code: def __init__(self, filepath, ncols, **h5_file_args):
      """Load and append to storage at filepath.
  
      File contains *ncols* columns in 'points' dataset (Lmin, L, and others).
      h5_file_args are passed on to hdf5.File.
      """
      import h5py
  
      self.ncols = int(ncols)
      self.stack_empty = True
      h5_file_args["mode"] = h5_file_args.get("mode", "a")
  
      # An annoying part of jupyter notebooks is that they keep all the variables
      # This means a old pointstore can survive, as we don't usually close them
      # Opening a new one with the same path will then fail with
      #    Unable to create file (unable to truncate a file which is already open)
      # even when overwriting/truncating (mode='w')
      # To avoid this problem, we keep track of all the files opened in this process
      # and when another HDF5PointStore instance is created with the same path,
      # we close the old one. Further operations on it will then likely fail.
      for i, (filepath2, fileobj2) in enumerate(
          HDF5PointStore.FILES_OPENED
      ):
          if filepath == filepath2:
              fileobj2.close()
              HDF5PointStore.FILES_OPENED.pop(i)
  
      self.fileobj = h5py.File(filepath, **h5_file_args)
      HDF5PointStore.FILES_OPENED.append((filepath, self.fileobj))
      self._load()
  
imports: from __future__ import print_function, division
  import numpy
  import warnings
  import os
label_desc: Use image node_id 1 to create a new HDF5PointStore object from inherited base classes: FilePointStore with example: obj = HDF5PointStore(filepath, ncols)