提交 f81f7893 authored 作者: Frederic Bastien's avatar Frederic Bastien

implemented CudaNdarrayType.values_eq.

上级 fabbc2f7
...@@ -52,8 +52,14 @@ class CudaNdarrayType(Type): ...@@ -52,8 +52,14 @@ class CudaNdarrayType(Type):
def filter(self, data, strict=False): def filter(self, data, strict=False):
return type_support_filter(data, self.broadcastable, strict) return type_support_filter(data, self.broadcastable, strict)
@staticmethod
def values_eq(a, b):
#TODO: make the comparaison without transfert.
return tensor.TensorType.values_eq(numpy.asarray(a), numpy.asarray(b))
@staticmethod @staticmethod
def values_eq_approx(a, b): def values_eq_approx(a, b):
#TODO: make the comparaison without transfert.
return tensor.TensorType.values_eq_approx(numpy.asarray(a), numpy.asarray(b)) return tensor.TensorType.values_eq_approx(numpy.asarray(a), numpy.asarray(b))
def dtype_specs(self): def dtype_specs(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论