0

Hi,

I have data in the form:

rpm Torque

1000 36

2000 40

3000 45

4000 50

.

.

I need to find the torque at a specific rpm.

I found numpy.interp() which will give me a linear interpolation, but my tutor said it wouldn't be accurate enough.

I found numpy.polyfit() which would be sufficient, but I can't seem to get a specific output e.g. for rpm = 12, torque = 37.

I can only find:

```
x = np.array([0.0, 1.0, 2.0, 3.0, 4.0, 5.0])
y = np.array([0.0, 0.8, 0.9, 0.1, -0.8, -1.0])
z = np.polyfit(x, y, 3)
print z
```

output: array([ 0.08703704, -0.81349206, 1.69312169, -0.03968254])

which I don't understand.

(from http://docs.scipy.org/doc/numpy/reference/generated/numpy.polyfit.html?highlight=interpolation)

Either polynomial fit or cubic spline would be great.

Can you guys help?