Skip to main content

Timeline for adding offset to a list of points

Current License: CC BY-SA 3.0

4 events
when toggle format what by license comment
Dec 20, 2015 at 18:25 vote accept Shb
Dec 20, 2015 at 18:08 comment added Oleksandr R. @Shb if you are adding e.g. a 2-vector to a 2×2 matrix, it is not clear along which dimension this addition should be performed. In your example it is not ambiguous, but because Mathematica does not have clear rules for all such ambiguous cases (unlike e.g. NumPy), for consistency it restricts threading to level 1. Although this situation could be improved by specifying new and more detailed threading rules, I think this cannot be changed now because it would affect (break) existing code. Also, as seen in the linked thread, choosing rules for ambiguous situations is not straightforward.
Dec 20, 2015 at 15:51 comment added Shb Thanks. Out of curiosity, do you know why Mathematica doesn't apply the same logic in the second case? What is it that makes the said operation ambiguous and make Mathematica hesitant to do the same as the 1D case?
Dec 20, 2015 at 15:48 history answered m0nhawk CC BY-SA 3.0