def kernel_rbf(x,y,scale=1, **kwds): #scale = kwds.get('scale',1) dist = ssp.minkowski_distance_p(x[:,np.newaxis,:],y[np.newaxis,:,:],2) return np.exp(-0.5/scale*(dist))