提交 cb8888ed authored 作者: Pascal Lamblin's avatar Pascal Lamblin 提交者: Frederic

Register ScalarConstant as Scalar.Constant

This solves a problem uncovered by the previous commit: a variable with an ndim field could be replaced by a Variable without one.
上级 72a122c1
......@@ -561,6 +561,9 @@ class ScalarVariable(_scalar_py_operators, Variable):
class ScalarConstant(_scalar_py_operators, Constant):
pass
# Register ScalarConstant as the type of Constant corresponding to Scalar
Scalar.Constant = ScalarConstant
# Easy constructors
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论