# Random data with proper shape
x1, x2, x3, x4 = np.random.uniform(1., 10., (4, 10, 1000))
# This is the operation I' trying to
dist = 0.01
for x in (x2, x3, x4):
# Mask of the distance between the column '-6' of x1 versus arrays
# x2, x3, x4
msk = abs(x1[-6] - x[-6]) > dist
# If the distance in this array is larger than the maximum allowed (dist),
# mask with values from 'x1'.
x[:, msk] = x1[:, msk]