4646from aesara .tensor .random .opt import local_subtensor_rv_lift
4747from aesara .tensor .random .var import RandomStateSharedVariable
4848from aesara .tensor .sharedvar import ScalarSharedVariable
49- from aesara .tensor .var import TensorVariable , TensorConstant
49+ from aesara .tensor .var import TensorConstant , TensorVariable
5050
5151from pymc .aesaraf import (
5252 compile_pymc ,
6161from pymc .distributions import joint_logpt
6262from pymc .distributions .logprob import _get_scaling
6363from pymc .distributions .transforms import _default_transform
64- from pymc .exceptions import ImputationWarning , ShapeWarning , SamplingError , ShapeError
64+ from pymc .exceptions import ImputationWarning , SamplingError , ShapeError , ShapeWarning
6565from pymc .initial_point import make_initial_point_fn
6666from pymc .math import flatten_list
6767from 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