I noticed the following documentation on `numpy.invert`: [1]

########
numpy.invert
[...]
Compute bit-wise inversion, or bit-wise NOT, element-wise.

Computes the bit-wise NOT of the underlying binary representation of the 
integers in the input arrays. This ufunc implements the C/Python operator ~.
[...]
The ~ operator can be used as a shorthand for np.invert on ndarrays.

x1 = np.array([True, False])

~x1
array([False, True]) 
########

So, C/Python operator `~` has been overridden by the corresponding user 
function in numpy, but where is the corresponding source code implementation? 

[1] 
https://numpy.org/doc/stable/reference/generated/numpy.invert.html#numpy-invert 

Regards,
HZ
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to