tumourkit.postprocessing.compare_barcodes.read_diagram_from_csv

tumourkit.postprocessing.compare_barcodes.read_diagram_from_csv(path: str, homology_dim: int) ndarray

Reads a persistence diagram from a CSV file and filters by homology dimension.

Parameters:
  • path (str) – Path to the CSV file.

  • homology_dim (int) – Homology dimension to extract (e.g., 0 for H0).

Returns:

Numpy array of (birth, death) pairs for the specified homology dimension.

Return type:

np.ndarray