I was doing some practice with lists, arrays and matrices in python and I got confused at something.
if I do:
list1 = [1,2,3,4]
list2 = [2,3,4,5]
print list1 + list2
Output:
I get [1,2,3,4,2,3,4,5]
I think it was like yesterday I was doing something similar but I got
Output2:
[3,5,7,9]
the actual addition of the values of each respective element on both lists. But I was actually expecting it to be the first output, but it added the values.
I haven't done linear algebra or prob&stats in a while. What was the method called for the output I got in output1? and output2? I've confused myself bad.
edit: http://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.add.html If you look at the 2nd example they do a 3x3 array + 1x3 array. I thought if there not the same dimension you can't add them?