From 9e9511152a0495d123091d04af264e187fc6ab21 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Sat, 25 Apr 2020 11:02:14 +0200 Subject: Fix #259 --- src/python/gudhi/persistence_graphical_tools.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/python/gudhi/persistence_graphical_tools.py') diff --git a/src/python/gudhi/persistence_graphical_tools.py b/src/python/gudhi/persistence_graphical_tools.py index cc3db467..03fc9066 100644 --- a/src/python/gudhi/persistence_graphical_tools.py +++ b/src/python/gudhi/persistence_graphical_tools.py @@ -109,9 +109,6 @@ def plot_persistence_barcode( plt.rc('text', usetex=True) plt.rc('font', family='serif') - - persistence = _array_handler(persistence) - if persistence_file != "": if path.isfile(persistence_file): # Reset persistence @@ -126,6 +123,8 @@ def plot_persistence_barcode( print("file " + persistence_file + " not found.") return None + persistence = _array_handler(persistence) + if max_barcodes != 1000: print("Deprecated parameter. It has been replaced by max_intervals") max_intervals = max_barcodes @@ -255,8 +254,6 @@ def plot_persistence_diagram( plt.rc('text', usetex=True) plt.rc('font', family='serif') - persistence = _array_handler(persistence) - if persistence_file != "": if path.isfile(persistence_file): # Reset persistence @@ -271,6 +268,8 @@ def plot_persistence_diagram( print("file " + persistence_file + " not found.") return None + persistence = _array_handler(persistence) + if max_plots != 1000: print("Deprecated parameter. It has been replaced by max_intervals") max_intervals = max_plots @@ -425,8 +424,6 @@ def plot_persistence_density( plt.rc('text', usetex=True) plt.rc('font', family='serif') - persistence = _array_handler(persistence) - if persistence_file != "": if dimension is None: # All dimension case @@ -440,6 +437,7 @@ def plot_persistence_density( return None if len(persistence) > 0: + persistence = _array_handler(persistence) persistence_dim = np.array( [ (dim_interval[1][0], dim_interval[1][1]) -- cgit v1.2.3