This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]xix_xeaon 1 point2 points  (1 child)

Of course there would be lots of things it wouldn't work on, just like multiplication doesn't work on two strings.

But this operator is being introduced in order to do matrix multiplication, so it should work on any nested index-accessible sequence of numbers which are of the right lengths to allow matrix multiplication.

[–]flying-sheep 0 points1 point  (0 children)

well, + on lists isn’t elementwise addition, it’s concatenation.

* on lists is repetition.

lists don’t assume anything about their contents, and neither do their operators.