提交 4b2d5da4 authored 作者: James Bergstra's avatar James Bergstra

any -> numpy.any for old python

上级 ec537fd6
...@@ -128,10 +128,10 @@ class CudaNdarrayType(Type): ...@@ -128,10 +128,10 @@ class CudaNdarrayType(Type):
if (other.type.dtype != self.dtype): if (other.type.dtype != self.dtype):
raise TypeError('Incompatible dtype', (self.dtype, raise TypeError('Incompatible dtype', (self.dtype,
other.type.dtype)) other.type.dtype))
if any(bi and not obi if numpy.any([bi and not obi
for obi, bi in zip( for obi, bi in zip(
other.type.broadcastable, other.type.broadcastable,
self.broadcastable)): self.broadcastable)]):
raise TypeError('Incompatible broadcastable', (self.broadcastable, raise TypeError('Incompatible broadcastable', (self.broadcastable,
other.type.broadcastable)) other.type.broadcastable))
if other.type.broadcastable != self.broadcastable: if other.type.broadcastable != self.broadcastable:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论