summaryrefslogtreecommitdiff
path: root/src/python/gudhi/persistence_graphical_tools.py
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-05-11 09:32:05 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-05-11 09:32:05 +0200
commitb97eb8e89e8d80fabfc9d7ab66f40f7e02b4a169 (patch)
tree0bde6398139f18f0459240640582a978aff12481 /src/python/gudhi/persistence_graphical_tools.py
parent7e85b0451c686f043b61cde2e5f78674cf8de248 (diff)
parent2a4a9528aef4c553c3de9544b729c8a3c6f43c26 (diff)
Merge branch 'master' into improve_dependencies_documentation2
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])