diff options
author | tlacombe <lacombe1993@gmail.com> | 2020-03-31 12:53:42 +0200 |
---|---|---|
committer | tlacombe <lacombe1993@gmail.com> | 2020-03-31 12:53:42 +0200 |
commit | e6c21aa957bbf66854f31824cd4313c61f7ea9fc (patch) | |
tree | 091c246f585e5836a2b1868414227d3d12938eaa /src/python/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py | |
parent | dae83f0907a5bd94cb483ad0f54755da2d49fb75 (diff) | |
parent | 2f46606b406aafc69e37a68dca33e1858ab7b817 (diff) |
merged master
Diffstat (limited to 'src/python/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py')
-rwxr-xr-x | src/python/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/python/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py b/src/python/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py index c692e66f..499171df 100755 --- a/src/python/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py +++ b/src/python/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py @@ -2,10 +2,14 @@ import argparse import matplotlib.pyplot as plot +import errno +import os import gudhi -""" This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. - See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. +""" This file is part of the Gudhi Library - https://gudhi.inria.fr/ - + which is released under MIT. + See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full + license details. Author(s): Vincent Rouvreau Copyright (C) 2016 Inria @@ -57,9 +61,10 @@ parser.add_argument( args = parser.parse_args() if is_file_perseus(args.file): - print("#####################################################################") + print("##################################################################") print("PeriodicCubicalComplex creation") - periodic_cubical_complex = gudhi.PeriodicCubicalComplex(perseus_file=args.file) + periodic_cubical_complex = gudhi.PeriodicCubicalComplex( + perseus_file=args.file) print("persistence(homology_coeff_field=3, min_persistence=0)=") diag = periodic_cubical_complex.persistence( @@ -73,4 +78,5 @@ if is_file_perseus(args.file): gudhi.plot_persistence_barcode(diag) plot.show() else: - print(args.file, "is not a valid perseus style file") + raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), + args.file) |