News for hackers. Stuff that matters.
Re:NumPy Illustrated: The Visual Guide to NumPy by pansa2 on Tuesday December 29, 2020 @02:43AM (#25567658)
`3 <= a <= 5` expands to `3 <= a and a <= 5`. However, based on the examples NumPy seems to require `&` instead of `and` - I’m not sure why.
Re:NumPy Illustrated: The Visual Guide to NumPy by Pinus on Tuesday December 29, 2020 @08:21AM (#25569485)
A type can't implement its own 'and' and 'or' operators. (Probably because it is non-obvious how to handle their short-circuiting behaviour.)