Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gen_imgs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""Generate some plots for the pyGAM repo."""

import matplotlib

matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.font_manager import FontProperties
Expand Down Expand Up @@ -323,7 +326,6 @@ def chicago_tensor():


def expectiles():

"""Generate expectiles visualization."""
X, y = mcycle(return_X_y=True)

Expand Down
6 changes: 2 additions & 4 deletions pygam/tests/test_GAM_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ def test_summary_returns_12_lines(mcycle_gam):
known smoothing parameters, but when smoothing parameters have been estimated, the p-values
are typically lower than they should be, meaning that the tests reject the null too readily.
""" # noqa: E501
if sys.version_info.major == 2:
from StringIO import StringIO
if sys.version_info.major == 3:
from io import StringIO # noqa: F811
from io import StringIO

stdout = sys.stdout # keep a handle on the real standard output
sys.stdout = StringIO() # Choose a file-like object to write to
mcycle_gam.summary()
Expand Down
Loading