summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-07-28 16:31:05 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-07-28 16:31:05 +0200
commitd9d4bf2ef2c2676389cca4ce4e6595ca2e4ca0b1 (patch)
treec2980f20b3175109848d97129e63b18c35ae28e6 /src
parent37f806271cc5f00525cbabe0f2ec9db440d455ee (diff)
Code review: rollback lru_cache
Diffstat (limited to 'src')
-rw-r--r--src/python/gudhi/persistence_graphical_tools.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/python/gudhi/persistence_graphical_tools.py b/src/python/gudhi/persistence_graphical_tools.py
index c9c85e46..848dc03e 100644
--- a/src/python/gudhi/persistence_graphical_tools.py
+++ b/src/python/gudhi/persistence_graphical_tools.py
@@ -11,6 +11,7 @@
from os import path
from math import isfinite
import numpy as np
+from functools import lru_cache
from gudhi.reader_utils import read_persistence_intervals_in_dimension
from gudhi.reader_utils import read_persistence_intervals_grouped_by_dimension
@@ -57,6 +58,7 @@ def _array_handler(a):
else:
return a
+@lru_cache(maxsize=1)
def _matplotlib_can_use_tex():
"""This function returns True if matplotlib can deal with LaTeX, False otherwise.
The returned value is cached.