提交 124ed5df authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Change AssertionError to ValueError in the In class

上级 344ff6be
......@@ -197,7 +197,7 @@ class In(SymbolicInput):
# the input can be destroyed. borrow simply implies the output can be
# aliased to the input. Thus mutable=True should require borrow=True.
if mutable and not self.borrow:
raise AssertionError(
raise ValueError(
f"Symbolic input for variable {variable} (name={name}) has "
"flags mutable=True, borrow=False. This combination is "
"incompatible since mutable=True implies that the "
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论