2 ms·
Is there some language where [4,6] is the output? Yes. Python: >>> x = numpy.array([1,2]) >>> y = numpy.array([3,4]) >>> x + y array([4, 6])
by Animats 11y ago
Is there some language where [4,6] is the output?
Yes. Python:
>>> x = numpy.array([1,2])
>>> y = numpy.array([3,4])
>>> x + y
array([4, 6])
For extra fun:
>>> x + [3,4]
array([4, 6])
>>> [1,2] + y
array([4, 6])
but, of course:
>>> [1,2] + [3,4]
[1, 2, 3, 4]