def load_csv(path):
    """Loads a histogram as output from Geant4 analysis tools in CSV format.

    Parameters
    ----------
    path: str
        Path to the CSV file

    Returns
    -------
    physt.histogram1d.Histogram1D or physt.histogram_nd.Histogram2D
    """
    meta = []
    data = []
    with codecs.open(path, encoding="ASCII") as in_file:
        for line in in_file:
            if line.startswith("#"):
                key, value = line[1:].strip().split(" ", 1)
                meta.append((key, value))   # TODO: There are duplicit entries :-()
            else:
                try:
                    data.append([float(frag) for frag in line.split(",")])
                except:
                    pass
    data = np.asarray(data)
    ndim = int(_get(meta, "dimension"))
    if ndim == 1:
        return _create_h1(data, meta)
    elif ndim == 2:
        return _create_h2(data, meta)
Loads a histogram as output from Geant4 analysis tools in CSV format.

    Parameters
    ----------
    path: str
        Path to the CSV file

    Returns
    -------
    physt.histogram1d.Histogram1D or physt.histogram_nd.Histogram2D