Skip to content

Commit aaafa8d

Browse files
Remove awkward from theano import theano statements (#4054)
Co-authored-by: Brandon T. Willard <[email protected]>
1 parent 8dbfc75 commit aaafa8d

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

docs/source/notebooks/normalizing_flows_overview.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"import seaborn as sns\n",
2828
"import pymc3 as pm\n",
2929
"import numpy as np\n",
30-
"from theano import theano, tensor as tt\n",
30+
"import theano\n",
31+
"import theano.tensor as tt\n",
3132
"from collections import Counter\n",
3233
"\n",
3334
"pm.set_tt_rng(42)\n",

pymc3/model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
from pandas import Series
2525
import scipy.sparse as sps
2626
import theano.sparse as sparse
27-
from theano import theano, tensor as tt
27+
import theano
28+
import theano.tensor as tt
2829
from theano.tensor.var import TensorVariable
2930
from theano.compile import SharedVariable
3031

pymc3/tests/test_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
# limitations under the License.
1414

1515
import pytest
16-
from theano import theano, tensor as tt
16+
import theano
17+
import theano.tensor as tt
1718
import numpy as np
1819
import pandas as pd
1920
import numpy.testing as npt

pymc3/tests/test_theanof.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
import pytest
1717
from itertools import product
1818

19-
from theano import theano, tensor as tt
19+
import theano
20+
import theano.tensor as tt
2021
import numpy as np
2122

2223
from pymc3.theanof import set_theano_conf, take_along_axis, _conversion_map

pymc3/tests/test_variational_inference.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
import io
1818
import operator
1919
import numpy as np
20-
from theano import theano, tensor as tt
20+
import theano
21+
import theano.tensor as tt
2122

2223

2324
import pymc3 as pm

pymc3/theanof.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import numpy as np
1616
import theano
17-
from theano import theano, scalar, tensor as tt
17+
from theano import scalar, tensor as tt
1818
from theano.configparser import change_flags
1919
from theano.gof import Op
2020
from theano.gof.graph import inputs

pymc3/variational/stein.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from theano import theano, tensor as tt
15+
import theano
16+
import theano.tensor as tt
1617
from pymc3.variational.opvi import node_property
1718
from pymc3.variational.test_functions import rbf
1819
from pymc3.theanof import floatX, change_flags

0 commit comments

Comments
 (0)