I came across a line of code using Python's numpy that looked like this:
~array([0,1,2,3,4,5,4,3,2,1,0,-1,-2])
And it gave the output:
array([-1, -2, -3, -4, -5, -6, -5, -4, -3, -2, -1, 0, 1])
Does the unary operator (~) take an array and apply A -> -(A+1)
If so, whats the point?