提交 51d68468 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Added comment so that people do not think Theano devs are smoking weird substances

上级 c2200154
......@@ -264,6 +264,9 @@ class TensorType(Type):
if 'int' in str(a.dtype):
return numpy.all(a==b)
elif a.shape == (): #for comparing scalars, use broadcasting.
# Note: according to James B, there was a reason for the
# following two lines, that may seem weird at first glance.
# If someone can figure out what it is, please say it here!
ones = numpy.ones(2)
return numpy.allclose(ones * a, ones*b)
#elif str(a.dtype).startswith('complex'):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论