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 so on. These operators allow you to do clever tricks, which should be good for performance; however, they can make your code quite unreadable, so use them with care.