13 Mar
2020
13 Mar
'20
9:06 a.m.
On Thu, Mar 12, 2020 at 09:08:57AM -0700, Christopher Barker via Python-ideas wrote:
On Thu, Mar 12, 2020 at 5:50 AM Marco Sulla via Python-ideas < python-ideas@python.org> wrote:
Actually, this is the behaviour of ndarray with any dtype. And IMHO ithis is quite.... terrible?
I can see how you would think that. But the fact is that element-wise operations are very important to numpy.
If I could go back to 1995 or thereabouts when Python was first starting, I would make a clear distinction between scalar and vector operations, like Julia does. Borrowing Julia's syntax: a == b # compare a to b, returns True or False a .== b # elementwise comparison a*b # multiply a by b a.*b # elementwise multiplication -- Steven