shiftarr: shift a numpy array, extending the edges by averaging

tesfdmtools.methods.shiftarr.shiftarr(x, n)[source]

shift array number of bins in given direction. At the endpoints, the array is extended with the average of the array at the end

Args:
  • x = input array of any type (integer, float)

  • n = number of bins to shift, positive or negative