def f(x):
    x = np.array(x).reshape((- 1), xdim)
    return theta.T.dot(np.sqrt(((2.0 * sigma) / n_feats))).dot(np.cos((W.dot(x.T) + np.tile(b, (1, x.shape[0]))))).squeeze()
def f(x):
    x = np.array(x).reshape((- 1), xdim)
    return theta.T.dot(np.sqrt(((2.0 * sigma) / n_feats))).dot(np.cos((W.dot(x.T) + np.tile(b, (1, x.shape[0]))))).squeeze()