# Get the differentiation along first axis
diffs = np.diff(a,axis=0)
# Mask of invalid ones
mask = (diffs<0).any(0)
# Use the mask to set the invalid ones to the original elements
diffs[:,mask] = a[1:,mask]