diff options
author | Gard Spreemann <gspr@nonempty.org> | 2022-01-14 09:15:35 +0100 |
---|---|---|
committer | Gard Spreemann <gspr@nonempty.org> | 2022-01-14 09:15:35 +0100 |
commit | dbc404626955aee632fa47ee7a4d4c3add7d6188 (patch) | |
tree | b7acfc83c9ba316216a93e9a7d14c68c11d92804 /src/python/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py | |
parent | 2c221bfcf8effff9b010de8b2e13a22f6bc15201 (diff) | |
parent | 17c3c6a07cdb1b4d4f735f3bc996af30e216dfbe (diff) |
Merge tag 'tags/gudhi-release-3.5.0' into dfsg/latest
Diffstat (limited to 'src/python/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py')
-rwxr-xr-x | src/python/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/python/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py b/src/python/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py index 236d085d..8a9cc857 100755 --- a/src/python/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py +++ b/src/python/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py @@ -21,11 +21,12 @@ parser = argparse.ArgumentParser( description="RipsComplex creation from " "a distance matrix read in a csv file.", epilog="Example: " "example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py " - "-f ../data/distance_matrix/lower_triangular_distance_matrix.csv -e 12.0 -d 3" + "-f ../data/distance_matrix/lower_triangular_distance_matrix.csv -s , -e 12.0 -d 3" "- Constructs a Rips complex with the " "distance matrix from the given csv file.", ) parser.add_argument("-f", "--file", type=str, required=True) +parser.add_argument("-s", "--separator", type=str, required=True) parser.add_argument("-e", "--max_edge_length", type=float, default=0.5) parser.add_argument("-d", "--max_dimension", type=int, default=1) parser.add_argument("-b", "--band", type=float, default=0.0) @@ -44,7 +45,7 @@ print("RipsComplex creation from distance matrix read in a csv file") message = "RipsComplex with max_edge_length=" + repr(args.max_edge_length) print(message) -distance_matrix = gudhi.read_lower_triangular_matrix_from_csv_file(csv_file=args.file) +distance_matrix = gudhi.read_lower_triangular_matrix_from_csv_file(csv_file=args.file, separator=args.separator) rips_complex = gudhi.RipsComplex( distance_matrix=distance_matrix, max_edge_length=args.max_edge_length ) |