title: Inverting a numpy boolean array using ~
body: <p>Can I use <code>~A</code> to invert a numpy array of booleans, instead of the rather awkward functions <code>np.logical_and()</code> and <code>np.invert()</code>?</p>
  <p>Indeed, <code>~</code> seems to work fine, but I can't find it in any nympy reference manual, and - more alarmingly - it certainly does <em>not</em> work with scalars (e.g. <code>bool(~True)</code> returns <code>True</code> !), so I'm a little bit worried ...</p>