[Numpy-discussion] Boolean binary '-' operator
wieser.eric+numpy at gmail.com
Tue Jun 27 19:35:13 EDT 2017
It seems to me that after a healthy post-deprecation cycle, and if we
choose to keep the Z/2 meaning of __sub__, it might be worth reintroducing
__neg__ as a no-op? AFAICT, this is consistent with the Z/2 interpretation?
On Wed, 28 Jun 2017 at 00:08 Nathaniel Smith <njs at pobox.com> wrote:
> On Tue, Jun 27, 2017 at 3:09 PM, Robert Kern <robert.kern at gmail.com>
> > On Tue, Jun 27, 2017 at 3:01 PM, Benjamin Root <ben.v.root at gmail.com>
> >> Forgive my ignorance, but what is "Z/2"?
> > https://groupprops.subwiki.org/wiki/Cyclic_group:Z2
> > https://en.wikipedia.org/wiki/Cyclic_group
> This might be a slightly better link?
> Anyway, it's a math-nerd way of saying "the integers modulo two", i.e.
> the numbers 0 and 1 with * as AND and + as XOR. But the nice thing
> about Z/2 is that if you know some abstract algebra, then one of the
> most fundamental theorems is that if p is prime then Z/p is a "field",
> meaning that * and + are particularly well-behaved. And 2 is a prime,
> so pointing out that the bools with AND and XOR is the same as Z/2 is
> a way of saying "this way of defining * and + is internally consistent
> and well-behaved".
> Nathaniel J. Smith -- https://vorpus.org
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion