Multipolyfit IndexError: tuple index out of range
<p>I am trying to do multivariable non-linear regression with python. Hour, day, and temps are the independent variables, and load is the dependent variable.</p>

<p>I have installed numpy and multipolyfit. </p>

<p>The python code is the following:</p>

<pre><code>import numpy, multipolyfit
data=numpy.loadtxt("midatl_combined.txt")
hour=data[:,3]
day=data[:,4]
temps=data[:,5]
load=data[:,6]

a,b,c,d=numpy.polyfit(temps, load, 3)

a=str(round(a,2))
b=str(round(b,2))
c=str(round(c,2))
d=str(round(d,2))

print "load = " +a+" * temp^3 + "  +b+" * temp^2 + "  +c+" * temp + "   +d

a, b, c, d, e=multipolyfit.multipolyfit(hour, day, temps, load, 3)
</code></pre>

<p>The output is</p>

<pre><code>load = -3.91 * temp^3 + 547.89 * temp^2 + -25367.77 * temp + 416600.52
Traceback (most recent call last):
  File "midatl.py", line 84, in &lt;module&gt;
    a, b, c, d, e=multipolyfit.multipolyfit(hour, day, temps, load, 3)
  File "c:\Python27\lib\site-packages\multipolyfit-0.0.1-   
py2.7.egg\multipolyfit\
core.py", line 54, in multipolyfit
    num_covariates = xs.shape[1]
IndexError: tuple index out of range
</code></pre>

<p>The one-variable regression works fine, but the multi-variable regression does not.Why am I getting this error? </p>