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 <
> [email protected]> 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
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/7ILSYYOFPQL5DVH5DGIGQSL6PYFYF7PC/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to