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? Eric On Wed, 28 Jun 2017 at 00:08 Nathaniel Smith <njs@pobox.com> wrote:
On Tue, Jun 27, 2017 at 3:09 PM, Robert Kern <robert.kern@gmail.com> wrote:
On Tue, Jun 27, 2017 at 3:01 PM, Benjamin Root <ben.v.root@gmail.com> wrote:
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? https://en.wikipedia.org/wiki/Modular_arithmetic#Integers_modulo_n
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".
-n
-- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion