Adding constraint to the parameter

@junpenglao what do you mean by p here ?
Because if I use
p = np.array([p1,p2,p3]) I am going to get same error.