提交 2f8f4194 authored 作者: James Bergstra's avatar James Bergstra

switched the optional parameter order of scalar_constructor so that it starts…

switched the optional parameter order of scalar_constructor so that it starts with (value, name, strict)
上级 87c93405
...@@ -149,7 +149,7 @@ def tensor_constructor(value, name=None, strict=False, broadcastable=None): ...@@ -149,7 +149,7 @@ def tensor_constructor(value, name=None, strict=False, broadcastable=None):
return TensorSharedVariable(type=type, value=value, name=name, strict=strict) return TensorSharedVariable(type=type, value=value, name=name, strict=strict)
@shared_constructor @shared_constructor
def scalar_constructor(value, name=None, dtype=None, strict=False): def scalar_constructor(value, name=None, strict=False, dtype=None):
"""SharedVariable constructor for scalar values. Defaults to int64 or float64""" """SharedVariable constructor for scalar values. Defaults to int64 or float64"""
if not isinstance(value, (float,int)): if not isinstance(value, (float,int)):
raise TypeError() raise TypeError()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论