提交 6c5dbfc5 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Mimic what TensorType does for its value_zeros (and avoid invalid syntax on python <= 2.5).

上级 017a831c
...@@ -19,10 +19,9 @@ class GpuArrayType(Type): ...@@ -19,10 +19,9 @@ class GpuArrayType(Type):
Constant = None Constant = None
SharedVariable = None SharedVariable = None
@staticmethod def value_zeros(self, shape):
def value_zeros(*args, **kwargs): return pygpu.gpuarray.zeros(shape, dtype=self.typecode, kind=self.kind,
pygpu.gpuarray.zeros(*args, kind=globals.kind, context=self.context)
context=globals.context, **kwargs)
def __init__(self, dtype, broadcastable, kind=None, context=None, def __init__(self, dtype, broadcastable, kind=None, context=None,
name=None): name=None):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论