Skip to content

Commit fe9f0c0

Browse files
tensor(broadcastable=...) kwarg is depreciated (#710)
1 parent 69d1676 commit fe9f0c0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

preliz/internal/distribution_helper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ def inner_func(*args, signature_to_function=signature_to_function):
125125
except KeyError:
126126
pass
127127
symbolic_args = [
128-
tensor(broadcastable=bcast_pattern, dtype=dtype) for (bcast_pattern, dtype) in signature
128+
tensor(shape=tuple(1 if b else None for b in bcast_pattern), dtype=dtype)
129+
for (bcast_pattern, dtype) in signature
129130
]
130131
symbolic_out = func(*symbolic_args)
131132
signature_to_function[signature] = compiled_func = function(
@@ -169,7 +170,7 @@ def inner_func(*args, size, rng, signature_to_function=signature_to_function):
169170
pass
170171

171172
symbolic_args = [
172-
tensor(broadcastable=bcast_pattern, dtype=dtype)
173+
tensor(shape=tuple(1 if b else None for b in bcast_pattern), dtype=dtype)
173174
for (bcast_pattern, dtype) in signature[:-1]
174175
]
175176
symbolic_size = (

0 commit comments

Comments
 (0)