From d9d4bf2ef2c2676389cca4ce4e6595ca2e4ca0b1 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Tue, 28 Jul 2020 16:31:05 +0200 Subject: Code review: rollback lru_cache --- src/python/gudhi/persistence_graphical_tools.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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. -- cgit v1.2.3