diff --git a/docs/source/notebooks/normalizing_flows_overview.ipynb b/docs/source/notebooks/normalizing_flows_overview.ipynb index 6e395f21a3..cd800d2a44 100644 --- a/docs/source/notebooks/normalizing_flows_overview.ipynb +++ b/docs/source/notebooks/normalizing_flows_overview.ipynb @@ -27,7 +27,8 @@ "import seaborn as sns\n", "import pymc3 as pm\n", "import numpy as np\n", - "from theano import theano, tensor as tt\n", + "import theano\n", + "import theano.tensor as tt\n", "from collections import Counter\n", "\n", "pm.set_tt_rng(42)\n", diff --git a/pymc3/model.py b/pymc3/model.py index 5634a856d0..ccd123b7a0 100644 --- a/pymc3/model.py +++ b/pymc3/model.py @@ -24,7 +24,8 @@ from pandas import Series import scipy.sparse as sps import theano.sparse as sparse -from theano import theano, tensor as tt +import theano +import theano.tensor as tt from theano.tensor.var import TensorVariable from theano.compile import SharedVariable diff --git a/pymc3/tests/test_model.py b/pymc3/tests/test_model.py index 048258f85e..b2a6fee8ff 100644 --- a/pymc3/tests/test_model.py +++ b/pymc3/tests/test_model.py @@ -13,7 +13,8 @@ # limitations under the License. import pytest -from theano import theano, tensor as tt +import theano +import theano.tensor as tt import numpy as np import pandas as pd import numpy.testing as npt diff --git a/pymc3/tests/test_theanof.py b/pymc3/tests/test_theanof.py index 824bdfb81b..3c029d6c54 100644 --- a/pymc3/tests/test_theanof.py +++ b/pymc3/tests/test_theanof.py @@ -16,7 +16,8 @@ import pytest from itertools import product -from theano import theano, tensor as tt +import theano +import theano.tensor as tt import numpy as np from pymc3.theanof import set_theano_conf, take_along_axis, _conversion_map diff --git a/pymc3/tests/test_variational_inference.py b/pymc3/tests/test_variational_inference.py index b807587a39..5b8cddb393 100644 --- a/pymc3/tests/test_variational_inference.py +++ b/pymc3/tests/test_variational_inference.py @@ -17,7 +17,8 @@ import io import operator import numpy as np -from theano import theano, tensor as tt +import theano +import theano.tensor as tt import pymc3 as pm diff --git a/pymc3/theanof.py b/pymc3/theanof.py index 9761a04358..03350b4515 100644 --- a/pymc3/theanof.py +++ b/pymc3/theanof.py @@ -14,7 +14,7 @@ import numpy as np import theano -from theano import theano, scalar, tensor as tt +from theano import scalar, tensor as tt from theano.configparser import change_flags from theano.gof import Op from theano.gof.graph import inputs diff --git a/pymc3/variational/stein.py b/pymc3/variational/stein.py index 81709d8c0e..acf8298035 100644 --- a/pymc3/variational/stein.py +++ b/pymc3/variational/stein.py @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from theano import theano, tensor as tt +import theano +import theano.tensor as tt from pymc3.variational.opvi import node_property from pymc3.variational.test_functions import rbf from pymc3.theanof import floatX, change_flags