human
Solve the following python programming problem given the following code:
# Credits: http://stackoverflow.com/a/1409496/5091738
def make_integrand(feature_vec, theta, s0, n_dim):
    argstr = ", ".join(["s{}".format(i) for i in xrange(1, n_dim)])
    
    code = "def integrand({argstr}):\n" \
           "    return feature_vec(np.array([s0, {argstr}]), 0).dot(theta)\n" \
                .format(argstr=argstr)
            
    #print code
            
    compiled = compile(code, "fakesource", "exec")
    fakeglobals = {'feature_vec': feature_vec, 'theta': theta, 's0': s0,
                   'np': np}
    fakelocals = {}
    eval(compiled, fakeglobals, fakelocals)
    
    return fakelocals['integrand']

print make_integrand(None, None, None, 4)

for order in xrange(1,3):
    for n_dim in xrange(2, 4):
        print "\norder {} dims {}".format(order, n_dim)
        
        min_max = np.array([np.zeros(n_dim), 3 * np.ones(n_dim)])
        n_weights, feature_vec = fourier_fa.make_feature_vec(
                                    min_max,
                                    n_acts=1,
                                    order=order) 
        
        theta = np.cos(np.arange(0, 2*np.pi, 2*np.pi/n_weights))
        
        sample_xs = np.arange(0, 3, 0.3)
        
        def num_Q_at_x(s0):
            integrand = make_integrand(feature_vec, theta, s0, n_dim)
            return scipy.integrate.nquad(integrand,  min_max.T[1:])
        
        num_Qs =  np.array( map(num_Q_at_x, sample_xs) )
        #print num_Qs
        
        sym_Q_at_x = fourier_fa_int.make_sym_Q_s0(min_max, order)
        
        sym_Qs = np.array( [sym_Q_at_x(theta, 0, s0) for s0 in sample_xs] )
        #print sym_Qs
        
        print sym_Qs / num_Qs[:,0]
Given the above code, generate some markdown instructions for it.
assistant
#Here is Python code to print code
.

Let's try some arbitrary thetas
And see what the ratio depends on. I've seen above that it's probably not the order of the Fourier FA, but the number of dimensions.