numpy clip not working in programmable filter

I am trying to use numpy in programmable filter. I can do other operations such as divide, converting list to numpy array etc., but numpy clip does not work. It does not throw any error but I see that numpy clip has no effect. Does anyone has any idea what might be wrong. Here is the python code that I am using in the programmable filter

import numpy as np
input0=inputs[0]
rho=np.array(input0.CellData['rho'])
data['u'] = np.clip(np.divide(input0.CellData['rho_u'],rho),0.1,0.4)
output.CellData.append(data['u'], "u")