This blog post is triggered by a colleague stopping me in the hall and asking “What does ~
do in Python?” She was surprised by the behavior of the ~
operator when applied to Python bool types and I was surprised that it behaved differently on numpy bools than on Python bools …