提交 5ef9904f authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Only allow bitwise ops between ints.

上级 376ca250
...@@ -1285,7 +1285,7 @@ class BinaryBitOp(BinaryScalarOp): ...@@ -1285,7 +1285,7 @@ class BinaryBitOp(BinaryScalarOp):
if t0 == bool and t1 == bool: if t0 == bool and t1 == bool:
return [bool] return [bool]
for i in input_types[0]: for i in input_types[0]:
if i not in discrete_types: if i not in integer_types:
raise TypeError('input to a BitOp must have type (u)int8, ' raise TypeError('input to a BitOp must have type (u)int8, '
'(u)int16, (u)int32 or (u)int64 or ' '(u)int16, (u)int32 or (u)int64 or '
'be all bools not %s' % i) 'be all bools not %s' % i)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论