(self, path)
Save the log to an npz file.

    Stores the log in structured form in an npz file. The resulting file can be
    extracted using unzip, which will write every leaf node to its own file in
    an equivalent directory structure.

    Args:
      path: the path of the npz file to which to save.
Save the log to an npz file.
Save the log to an npz file .
def dump(self, path):
    """Save the log to an npz file.

    Stores the log in structured form in an npz file. The resulting file can be
    extracted using unzip, which will write every leaf node to its own file in
    an equivalent directory structure.

    Args:
      path: the path of the npz file to which to save.
    """
    dikt = {}

    def _compile_npz_dict(item, path):
      i, node = item
      if isinstance(node, _Section):
        for subitem in node.items:
          _compile_npz_dict(subitem,
                            os.path.join(path, "%s_%s" % (i, node.label)))
      else:
        for k, v in node.items():
          dikt[os.path.join(path, "%s_%s" % (i, k))] = v

    _compile_npz_dict((0, self.root), "")
    with lib_util.atomic_file(path) as p:
      np.savez_compressed(p, **dikt)
def dump ( self , path ) : dikt = { } def _compile_npz_dict ( item , path ) : i , node = item if isinstance ( node , _Section ) : for subitem in node . items : _compile_npz_dict ( subitem , os . path . join ( path , "%s_%s" % ( i , node . label ) ) ) else : for k , v in node . items ( ) : dikt [ os . path . join ( path , "%s_%s" % ( i , k ) ) ] = v _compile_npz_dict ( ( 0 , self . root ) , "" ) with lib_util . atomic_file ( path ) as p : np . savez_compressed ( p , * * dikt )