Skip to content

Commit

Permalink
move seaborn import to try to fix readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
leifwalsh committed Aug 26, 2017
1 parent 030abf1 commit 13346bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion perfume/perfume.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from IPython import display as ipdisplay
import numpy as np
import pandas as pd
import seaborn as sns

from perfume import analyze
from perfume import colors
Expand Down Expand Up @@ -123,6 +122,10 @@ def _ks_style(s):
return 'background-color: {}'.format(color)

def update(self, samples):
# If this is a module-level import, readthedocs fails because
# this triggers an import of _tkinter, which isn't built in to
# the python that they use.
import seaborn as sns
with Timer() as timer:
timings = analyze.timings(samples)
for name, sources in self._sources.items():
Expand Down

0 comments on commit 13346bb

Please sign in to comment.