I did exactly as in hints but its giving an error as below
AssertionError Traceback (most recent call last)
in
5
6 # UNIT TEST
----> 7 compute_centroids_test(compute_centroids)
~/work/public_tests.py in compute_centroids_test(target)
13
14 assert type(centroids) == np.ndarray, “Wrong type”
—> 15 assert centroids.shape == (K, X.shape[1]), f"Wrong shape. Expected: {(len(X),)} got: {idx.shape}"
16 assert np.allclose(centroids, expected_centroids), f"Wrong values. Expected: {expected_centroids}, got: {centroids}"
17
AssertionError: Wrong shape. Expected: (7,) got: (7,)
My code in the function
Can someone help me to fix this.