scott-griffiths / bitstring

A Python module to help you manage your bits
https://bitstring.readthedocs.io/en/stable/index.html
MIT License
401 stars 67 forks source link

Array == and != should be per element #292

Closed scott-griffiths closed 11 months ago

scott-griffiths commented 11 months ago

Now that we're doing element-wise operations, it makes sense that == and != work that way too.

The current implementation could become a method (numpy uses np.array_equal(A, B) which doesn't really fit the API style of bitstring). You could do (a == b).all(True) if we had an all method :)

Or a.equals(b) would be simple enough.