Skip to content

Commit 8e2ff0a

Browse files
forgot pre-commit
1 parent 5f4e5aa commit 8e2ff0a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pymc/model.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
from aesara.tensor.random.opt import local_subtensor_rv_lift
4747
from aesara.tensor.random.var import RandomStateSharedVariable
4848
from aesara.tensor.sharedvar import ScalarSharedVariable
49-
from aesara.tensor.var import TensorVariable, TensorConstant
49+
from aesara.tensor.var import TensorConstant, TensorVariable
5050

5151
from pymc.aesaraf import (
5252
compile_pymc,
@@ -61,7 +61,7 @@
6161
from pymc.distributions import joint_logpt
6262
from pymc.distributions.logprob import _get_scaling
6363
from pymc.distributions.transforms import _default_transform
64-
from pymc.exceptions import ImputationWarning, ShapeWarning, SamplingError, ShapeError
64+
from pymc.exceptions import ImputationWarning, SamplingError, ShapeError, ShapeWarning
6565
from pymc.initial_point import make_initial_point_fn
6666
from pymc.math import flatten_list
6767
from pymc.util import (
@@ -1180,7 +1180,7 @@ def set_data(
11801180
# NOTE: If there are multiple pm.MutableData containers sharing this dim, but the user only
11811181
# changes the values for one of them, they will run into shape problems nonetheless.
11821182
if length_changed:
1183-
if isinstance(length_tensor,TensorConstant):
1183+
if isinstance(length_tensor, TensorConstant):
11841184
raise ShapeError(
11851185
f"Resizing dimension '{dname}' is impossible, because "
11861186
f"a 'TensorConstant' stores its length. To be able "
@@ -1221,7 +1221,6 @@ def set_data(
12211221
# Updating the shared variable resizes dependent nodes that use this dimension for their `size`.
12221222
length_tensor.set_value(new_length)
12231223

1224-
12251224
if new_coords is not None:
12261225
# Update the registered coord values (also if they were None)
12271226
if len(new_coords) != new_length:
@@ -1232,7 +1231,6 @@ def set_data(
12321231
)
12331232
self._coords[dname] = new_coords
12341233

1235-
12361234
shared_object.set_value(values)
12371235

12381236
def register_rv(

0 commit comments

Comments
 (0)