提交 dcc18636 authored 作者: Emmanuel Ferdman's avatar Emmanuel Ferdman 提交者: Ricardo Vieira

Resolve deprecation warnings of regex library

上级 afe934b2
......@@ -174,7 +174,7 @@ def materialize_implicit_arange_choice_without_replacement(fgraph, node):
new_props_dict = op._props_dict().copy()
# Signature changes from something like "(),(a),(2)->(s0, s1)" to "(a),(a),(2)->(s0, s1)"
# I.e., we substitute the first `()` by `(a)`
new_props_dict["signature"] = re.sub(r"\(\)", "(a)", op.signature, 1)
new_props_dict["signature"] = re.sub(r"\(\)", "(a)", op.signature, count=1)
new_op = type(op)(**new_props_dict)
return new_op.make_node(rng, size, a_vector_param, *other_params).outputs
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论