Skip to content

Commit dcc1863

Browse files
emmanuel-ferdmanricardoV94
authored andcommitted
Resolve deprecation warnings of regex library
Signed-off-by: Emmanuel Ferdman <[email protected]>
1 parent afe934b commit dcc1863

File tree

1 file changed

+1
-1
lines changed
  • pytensor/tensor/random/rewriting

1 file changed

+1
-1
lines changed

pytensor/tensor/random/rewriting/jax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def materialize_implicit_arange_choice_without_replacement(fgraph, node):
174174
new_props_dict = op._props_dict().copy()
175175
# Signature changes from something like "(),(a),(2)->(s0, s1)" to "(a),(a),(2)->(s0, s1)"
176176
# I.e., we substitute the first `()` by `(a)`
177-
new_props_dict["signature"] = re.sub(r"\(\)", "(a)", op.signature, 1)
177+
new_props_dict["signature"] = re.sub(r"\(\)", "(a)", op.signature, count=1)
178178
new_op = type(op)(**new_props_dict)
179179
return new_op.make_node(rng, size, a_vector_param, *other_params).outputs
180180

0 commit comments

Comments
 (0)