NumPy - Array Operations
Which of the following is the correct syntax to add two numpy arrays
a and b element-wise?a and b element-wise?+ operator performs element-wise addition in numpy.a.add(b) is invalid because numpy arrays do not have an add method. np.sum(a, b) computes sums, not element-wise addition. a.append(b) is a list method and errors on arrays.+ operator adds arrays element-wise [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions