TST + BF: Make sure that input to np.gradient is an array.