Description
Problem Discussion with Sabyasachi
1. Meshgrid – Broadcasting
Implement np.meshgrid
X = np.arange(5) Y = np.array(6,11) print(np.meshgrid(X,Y))
1. Meshgrid – Solution
2. Distances – Broadcasting
Standard Question
You are given a set of let’s say five 2d points as an ndarray and you want to compute the euclidean distance between each pair of points and store it into a 5*5 ndarray.
Source: One of the TODOs of the Lab Question 3
2. Distances – Solution
3. Labels to Centers
One of the TODOs of the Lab Question 3
Given labels of spicepoints, what are the updated centers
3. Labels to Centers – Solution




Reviews
There are no reviews yet.