More than 5 years have passed since last update.
import numpy as np
np.roll(a,shift,axis=0)
Register as a new user and use Qiita more conveniently