提交 09a3ead6 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

In order to ease checks I've allowed scalar variables to have the ndim

property
上级 3c3c186b
......@@ -119,6 +119,7 @@ class Scalar(Type):
TODO: refactor to be named ScalarType for consistency with TensorType
"""
ndim = 0
def __init__(self, dtype):
if dtype == 'floatX':
......@@ -441,6 +442,9 @@ all_types = discrete_types + continuous_types
class _scalar_py_operators:
# So that we can simplify checking code when we have a mixture of Scalar
# variables and Tensor variables
ndim = 0
#UNARY
def __abs__(self): return abs_(self)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论