We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
set_data
shape[i]
1 parent 70b0c49 commit 5da32edCopy full SHA for 5da32ed
pymc/model.py
@@ -1206,6 +1206,12 @@ def set_data(
1206
)
1207
elif length_tensor.owner is not None:
1208
# The dimension was created from a model variable.
1209
+ # Get a handle on the tensor from which this dimension length was
1210
+ # obtained by doing subindexing on the shape as in `.shape[i]`.
1211
+ # Needed to check if it was another shared variable.
1212
+ # TODO: Consider checking the graph is what we are assuming it is
1213
+ # isinstance(length_tensor.owner.op, Subtensor)
1214
+ # isinstance(length_tensor.owner.inputs[0].owner.op, Shape)
1215
length_belongs_to = length_tensor.owner.inputs[0].owner.inputs[0]
1216
if length_belongs_to is shared_object:
1217
# No surprise it's changing.
0 commit comments