On Mon, Oct 4, 2021 at 5:17 AM Hongyi Zhao <hongyi.z...@gmail.com> wrote:
> > > That’s just the way Python’s syntax works. Operators are not names that > can be resolved to objects that can be compared with the `is` operator. > Instead, when that operator is evaluated in an expression, the Python > interpreter will look up a specially-named method on the operand object (in > this case `__invert__`). Numpy array objects implement this method using > `np.invert`. > > If so, which is symlink to which, I mean, which is the original name, > and which is an alias? > "symlink" and "alias" are probably not the best analogies. The implementation of `np.ndarry.__invert__` simply calls `np.invert` to do the actual computation. -- Robert Kern
_______________________________________________ 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