def my_kernel(X, Y):
 M = np.array([[2, 0], [0, 1.0]])
 return np.dot(np.dot(X, M), Y.T)

def my_kernel ( X , Y ) : M = np . array ( [ [ 2 , 0 ] , [ 0 , 1.0 ] ] ) return np . dot ( np . dot ( X , M ) , Y . T )
we create a custom kernel: k = x y .