Skip to content

Commit 723ba71

Browse files
committed
Fix for #7762: make guard explicit
1 parent 4506fce commit 723ba71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymc/logprob/mixture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def find_measurable_index_mixture(fgraph, node):
289289
# We don't support (non-scalar) integer array indexing as it can pick repeated values,
290290
# but the Mixture logprob assumes all mixture values are independent
291291
if any(
292-
hasattr(indices, "dtype")
292+
isinstance(indices, TensorVariable)
293293
and indices.dtype.startswith("int")
294294
and not all(indices.type.broadcastable)
295295
for indices in mixing_indices

0 commit comments

Comments
 (0)