Scale just part of a curve - python sciPy : I need to scale a curve as shown on the picture underneath. The curve is a two-dimensional array consisting of many X and Y values. It is important that the curve stays continuous and there is no "leap" at the place where I want to cut. Do you have any ideas? Is there a function/functions in python that can do this?

 [![blue curve needed, red was the initial][1]][1]


  [1]: https://i.stack.imgur.com/pjYtW.png