提交 d2f81044 authored 作者: Sina Honari's avatar Sina Honari

making code compatible to flake8

上级 0ed10855
......@@ -4127,8 +4127,8 @@ class Reshape(Op):
shp_orig = shp
shp = as_tensor_variable(shp, ndim=1)
if not shp.dtype.startswith('int') and not(isinstance(shp,
TensorConstant)
and shp.data.size == 0):
TensorConstant) and
shp.data.size == 0):
# if shp is an instace of TensorConstant and
# shp.data is empty, then shp.dtype is float64
raise TypeError("Shape must be integers", shp, shp.dtype)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论