提交 ed634a9a authored 作者: Joseph Turian's avatar Joseph Turian

More descriptive error in scalar.filter

上级 b7c95b0b
......@@ -50,7 +50,7 @@ class Scalar(Type):
try:
return py_type(data)
except Exception, e:
raise TypeError("Could not convert to %s" % self.dtype, e)
raise TypeError("Could not convert %s (value=%s) to %s" % (type(data), data, self.dtype), e)
def __eq__(self, other):
return type(self) == type(other) and other.dtype == self.dtype
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论