提交 db97d511 authored 作者: Frederic's avatar Frederic

Add Scalar.dtype properties to make it work like TensorVariable.dtype

This fix a crash in the new memory profiler.
上级 902c4bf7
......@@ -459,6 +459,9 @@ class _scalar_py_operators:
# variables and Tensor variables
ndim = 0
dtype = property(lambda self: self.type.dtype)
""" The dtype of this scalar. """
#UNARY
def __abs__(self):
return abs_(self)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论