Skip to content

Commit

Permalink
Fix Matplotlib type error for tests (#4023)
Browse files Browse the repository at this point in the history
* Fix for issue 4022.

Check for support for `warn` argument in `matplotlib.use()` call. Drop it if it causes an error.

* Alternative fix.
  • Loading branch information
rpgoldman authored Jul 20, 2020
1 parent 28a4621 commit b2c682e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pymc3/tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@
import pytest
import theano
from pymc3.theanof import floatX
from packaging import version

from .helpers import SeededTest

matplotlib.use('Agg', warn=False)
if version.parse(matplotlib.__version__) < version.parse('3.3'):
matplotlib.use('Agg', warn=False)
else:
matplotlib.use('Agg')


def get_city_data():
Expand Down

0 comments on commit b2c682e

Please sign in to comment.