Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. def abslines(x,a,b,c,d):
  2. return np.piecewise(x, [x < -b/a, x >= -b/a], [lambda x: a*x+b+d, lambda x: c*(x+b/a)+d])
  3.  
  4. p0=[-0.001,0.2,0.005,0.]
  5.  
  6. bounds=([-1.,0.,0.,0.],[0.,1.,1.,1.])
  7. bounds=([-0.5,0.01,0.0001,0.],[-0.001,0.5,0.5,1.])
  8. bounds=([-0.1,0.01,0.0001,0.],[-0.001,0.5,0.1,1.])
  9. bounds=([-0.01,0.1,0.0001,0.],[-0.001,0.5,0.1,1.])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement