Commit b00073fe authored by Kirill Smelkov's avatar Kirill Smelkov

py2: kpi: Fix tobytes on np.void

On py2 np.void.data is buffer which does not have .tobytes() .
parent 4899f187
......@@ -352,8 +352,8 @@ def __eq__(a, b):
return False
# cast to dtype without aliases to avoid
# "dtypes with overlapping or out-of-order fields are not representable as buffers"
return a.view(a._dtype0).data.tobytes() == \
b.view(b._dtype0).data.tobytes()
return bytes(a.view(a._dtype0).data) == \
bytes(b.view(b._dtype0).data)
@func(Measurement)
def __ne__(a, b):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment