summaryrefslogtreecommitdiff
path: root/src/python/gudhi/persistence_graphical_tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/gudhi/persistence_graphical_tools.py')
-rw-r--r--src/python/gudhi/persistence_graphical_tools.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/python/gudhi/persistence_graphical_tools.py b/src/python/gudhi/persistence_graphical_tools.py
index d59e51a0..6a74a6ca 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
@@ -427,8 +426,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
@@ -442,6 +439,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])