Problem 12. Create a random k x k symmetric matrix whose entries are integers between 0 and 10.
In []: k = 5
# Write your code below
Problem 13. Find the average values of X in all 3x3 sliding windows.
In []: X=np.arange(25).reshape(5,5)
# Write your code below
Problem 14. Delete the repeated rows from X.
In []: np.random.seed(0)
X = np.random.randint(0,3, (10,2))
#print(X)
# Write your code below
Problem 15. Delete the repeated rows from X without changing the oder in which each row appears.
In []: np.random.seed (0)
X = np.random.randint(0,3,(10,2))
# Write your code below
Problem 16. Create a r X r matrix with values 1, 2, ..., r 1 just below the diagonal.
In []: r = 6
# Write your code below
Problem 17. Each row of X is the coordinates of a point in 3D-space. Find the distances between these points and the center of the these points.
In []: import numpy as np
X=np.random.randn(10)
def f(i,j):
return np.sqrt(np.sum ((X[i]-X[j])**2,1))
# Write your code below