Bitwise and comparison functions
Bitwise functions operate on the bits of integers or integer arrays, since they are universal functions. The operators ^
, &
, |
, <<
, >>
, and so on, have their NumPy counterparts. The same goes for comparison operators, such as, <
, >
, ==
, and likewise. These operators allow you to do some clever tricks, which should be good for performance; however, they could make your code quite unreadable, so use them with care.