Please take a look at this equation and implement it the way it shows, but do remember to include the transpose where it is required. And also, implement it using np.dot and notnp.sum.
Well, you can also do it as a two step process: multiply (elementwise meaning *) followed by np.sum. But the way you used np.sum is not correct: you gave it two arguments which are both arrays. The second argument is supposed to be something other than an array e.g. a specification of which axis to use or “keepdims” or the like. That’s what that error message is telling you: it didn’t like the arguments you gave.
Have a look at the documentation by googling “numpy sum”.