C3_W2_RecSysNN_Assignment_ exercise1_write a function to calculate square distance

Can anyone help me, to fix this code.

I think there is some mistake in my code. Can anyone identify it and tell me correct code.

Error message is been attached, along with code that I put in to calculate the square distance.

Code details:

def sq_dist(a,b):
“”"
Returns the squared distance between two vectors
Args:
a (ndarray (n,)): vector with n features
b (ndarray (n,)): vector with n features
Returns:
d (float) : distance
“”"
m = 10
X = np.random.randint(10, size =(m,m))
d = np.zeros((m,m), dtype = int)
### START CODE HERE ###
### END CODE HERE ###
return (d)

@rmwkwok ,

if you can help me in this. to fix the problem

@Harshal_Lathewala, I have sent you a message. I hope you will fix the problem yourself. I am closing this topic.

Raymond

P.S. We don’t encourage learners to share assignment code, so I am removing them.