Skip to content

Commit

Permalink
Merge pull request #126 from ghilesmeddour/topic/plot_deps_lazy_imports
Browse files Browse the repository at this point in the history
Lazy import plotting dependencies (#125)
  • Loading branch information
sauln authored Aug 11, 2021
2 parents ff3f017 + e49c07c commit 190f1ff
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ripser/ripser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@
from itertools import cycle
import warnings

import matplotlib.pyplot as plt
import matplotlib as mpl
from scipy import sparse

import numpy as np
from sklearn.base import TransformerMixin
from sklearn.metrics.pairwise import pairwise_distances

import persim

from pyRipser import doRipsFiltrationDM as DRFDM
from pyRipser import doRipsFiltrationDMSparse as DRFDMSparse

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

if diagrams is None:
# Allow using transformed diagrams as default
Expand Down

0 comments on commit 190f1ff

Please sign in to comment.