Elementwise sum of two array elemets

import numpy as np
x = [[11,22],[33,44]]
y = [[55,66],[77,88]]
x1 = np.array([[11,22],[33,44]], dtype=np.int32)
y1 = np.array([[55,66],[77,88]], dtype=np.int32)
print("ADD USING LIST\n",x + y)
print("ADD NUMPY ARRAY\n",np.add(x1, y1))

No comments: