4 ms·
Why is element-wise multiplication for a multi-dimensional array a "footgun"? You try it once, realize it's doing things element-wise, and then go lookup the p
by icapybara 4y ago
Why is element-wise multiplication for a multi-dimensional array a "footgun"?
You try it once, realize it's doing things element-wise, and then go lookup the proper product symbol (@ in numpy).
- oivey 4y agoI think I mostly like that element of NumPy’s design. 2D arrays are in general not matrices. Images, for example, do not have matrix multiplication semantics.
- danuker 4y agoI guess when you have a software package named "Mathematica", mathematicians expect to be able to take their math and transliterate it easily. Making them specify the "Dot" function would irk them. I don't know the motivation of the decision, but "ElementwiseProduct" is harder to type, and still has a lot of use cases.