Hello Friends, I am getting following error. I am not sure what is creating this error.
First three elements in idx are: [0 0 0]
AssertionError Traceback (most recent call last)
in
11 from public_tests import *
12
—> 13 find_closest_centroids_test(find_closest_centroids)
~/work/public_tests.py in find_closest_centroids_test(target)
39 assert type(idx) == np.ndarray, “Wrong type”
40 assert idx.shape == (len(X),), f"Wrong shape. Expected: {(len(X),)} got: {idx.shape}"
—> 41 assert np.allclose(idx, [0, 0, 0, 1, 1, 1]), “Wrong values”
42
43 # With 3 centroids
AssertionError: Wrong values
Expected Output:
First three elements in idx are [0 2 1]