title: Shift interpolation does not give expected behaviour
body: <p>When using <a href="https://docs.scipy.org/doc/scipy-0.16.1/reference/generated/scipy.ndimage.interpolation.shift.html" rel="noreferrer">scipy.ndimage.interpolation.shift</a> to shift a numpy data array along one axis with periodic boundary treatment (<code>mode = 'wrap'</code>), I get an unexpected behavior. The routine tries to force the first pixel (<code>index 0</code>) to be identical to the last one (<code>index N-1</code>) instead of the "last plus one (<code>index N</code>)".</p>
  
  <p>Minimal example:</p>
  
  <pre><code># module import
  import numpy as np
  from scipy.ndimage.interpolation import shift
  import matplotlib.pyplot as plt
  
  # print scipy.__version__
  # 0.18.1
  
  a = range(10)
  
  plt.figure(figsize=(16,12))
  
  for i, shift_pix in enumerate(range(10)):
      # shift the data via spline interpolation
      b = shift(a, shift=shift_pix, mode='wrap')
  
      # plotting the data
      plt.subplot(5,2,i+1)
      plt.plot(a, marker='o', label='data')
      plt.plot(np.roll(a, shift_pix), marker='o', label='data, roll')
      plt.plot(b, marker='o',label='shifted data')
      if i == 0:
          plt.legend(loc=4,fontsize=12)
      plt.ylim(-1,10)
      ax = plt.gca()
      ax.text(0.10,0.80,'shift %d pix' % i, transform=ax.transAxes)
  </code></pre>
  
  <p>Blue line: data before the shift<br>
  Green line: expected shift behavior<br>
  Red line: actual shift output of <a href="https://docs.scipy.org/doc/scipy-0.16.1/reference/generated/scipy.ndimage.interpolation.shift.html" rel="noreferrer">scipy.ndimage.interpolation.shift</a></p>
  
  <p>Is there some error in how I call the function or how I understand its behavior with <code>mode = 'wrap'</code>? The current results are in contrast to the mode parameter description from the related <a href="https://docs.scipy.org/doc/scipy-0.18.1/reference/tutorial/ndimage.html#filter-functions" rel="noreferrer">scipy tutorial page</a> and from another <a href="https://stackoverflow.com/questions/22669252/how-exactly-does-the-reflect-mode-for-scipys-ndimage-filters-work">StackOverflow post</a>. Is there an off-by-one-error in the code?</p>
  
  <p>Scipy version used is 0.18.1, distributed in anaconda-2.2.0</p>
  
  <p><a href="https://i.stack.imgur.com/QNJo2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QNJo2.png" alt="enter image description here"></a></p>