diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-03-22 11:06:52 +0100 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-03-22 11:06:52 +0100 |
commit | cd47fa8e718f6ede07aead032d524022bd68b608 (patch) | |
tree | 5c451ce83cff35c8962f2a06da5f950eb91ce1dc /src/python/example/alpha_complex_diagram_persistence_from_off_file_example.py | |
parent | 6225d21fa6fd87edf10731df87cd3a7099049358 (diff) | |
parent | 49f9e5cc6bf933705500ad96d674df6a9df7f713 (diff) |
Merge master and resolve conflicts
Diffstat (limited to 'src/python/example/alpha_complex_diagram_persistence_from_off_file_example.py')
-rwxr-xr-x | src/python/example/alpha_complex_diagram_persistence_from_off_file_example.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/python/example/alpha_complex_diagram_persistence_from_off_file_example.py b/src/python/example/alpha_complex_diagram_persistence_from_off_file_example.py index 4079a469..727af4fa 100755 --- a/src/python/example/alpha_complex_diagram_persistence_from_off_file_example.py +++ b/src/python/example/alpha_complex_diagram_persistence_from_off_file_example.py @@ -1,11 +1,15 @@ #!/usr/bin/env python import argparse +import errno +import os import matplotlib.pyplot as plot 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 @@ -41,7 +45,7 @@ args = parser.parse_args() with open(args.file, "r") as f: first_line = f.readline() if (first_line == "OFF\n") or (first_line == "nOFF\n"): - print("#####################################################################") + print("##############################################################") print("AlphaComplex creation from points read in a OFF file") message = "AlphaComplex with max_edge_length=" + repr(args.max_alpha_square) @@ -64,6 +68,7 @@ with open(args.file, "r") as f: gudhi.plot_persistence_diagram(diag, band=args.band) plot.show() else: - print(args.file, "is not a valid OFF file") + raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), + args.file) f.close() |