Skip to content

Commit 190f1ff

Browse files
authored
Merge pull request #126 from ghilesmeddour/topic/plot_deps_lazy_imports
Lazy import plotting dependencies (#125)
2 parents ff3f017 + e49c07c commit 190f1ff

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ripser/ripser.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,12 @@
2525
from itertools import cycle
2626
import warnings
2727

28-
import matplotlib.pyplot as plt
29-
import matplotlib as mpl
3028
from scipy import sparse
3129

3230
import numpy as np
3331
from sklearn.base import TransformerMixin
3432
from sklearn.metrics.pairwise import pairwise_distances
3533

36-
import persim
37-
3834
from pyRipser import doRipsFiltrationDM as DRFDM
3935
from pyRipser import doRipsFiltrationDMSparse as DRFDMSparse
4036

@@ -640,6 +636,9 @@ def plot(
640636
If you are using self.plot() as part of a subplot,
641637
set show=False and call plt.show() only once at the end.
642638
"""
639+
import matplotlib.pyplot as plt
640+
import matplotlib as mpl
641+
import persim
643642

644643
if diagrams is None:
645644
# Allow using transformed diagrams as default

0 commit comments

Comments
 (0)