3 ms·
My apologies, I misremembered that from when I first read it. I'm still on python 2.7 - in 3, does: [3] * [5] = [15] ? Because really it needs to reduce down
by NamTaf 13y ago
My apologies, I misremembered that from when I first read it. I'm still on python 2.7 - in 3, does:
[3] * [5] = [15]
? Because really it needs to reduce down to that if it's going to make sense from a continuity point of view.
edit: To clarify: Is that already part of 3.x, or shall it become part of 3.x once this is implemented?
- apl 13y agoA Python list is not a matrix, so I don't see how this change would entail your statement. Of course, for very specific use cases, a list looks like a numerical vector; the semantics are very different, though.
- maxerickson 13y agoFor numpy arrays, yes (for pretty much all versions). As apl said, Python lists aren't strictly a numerical type. "Numerical type" isn't quite the right description either, but the underlying point is that the design choices for lists don't necessarily favor mathematical convenience or consistency.