'**SUMMARY**
Resample the signal to fit into n samples. This method is
handy if you would like to resize multiple signals so that
they fit together nice. Note that using n < len(LineScan)
can cause data loss.
**PARAMETERS**
* *n* - The number of samples to resample to.
**RETURNS**
A LineScan object of length n.
**EXAMPLE**
>>>> import matplotlib.pyplot as plt
>>>> img = Image(\'lenna\')
>>>> sl = img.getLineScan(y=128)
>>>> plt.plot(sl)
>>>> plt.plot(sl.resample(100))
>>>> plt.show()'

def resample(self, n=100):

    signal = sps.resample(self, n)
    pts = np.array(self.pointLoc)
    x = linspace(pts[(0, 0)], pts[((-1), 0)], n)
    y = linspace(pts[(0, 1)], pts[((-1), 1)], n)
    pts = zip(x, y)
    retVal = LineScan(list(signal), image=self.image, pointLoc=self.pointLoc, pt1=self.pt1, pt2=self.pt2)
    retVal._update(self)
    return retVal
