@@ -318,7 +318,7 @@ def guess(
318318 "center" : lmfit .Parameter ("center" , peak ),
319319 "amp" : lmfit .Parameter ("amp" , np .max (y )),
320320 "freq" : lmfit .Parameter ("freq" , np .pi / np .abs (peak - valley )),
321- "width" : lmfit .Parameter ("width" , max (x ) - min (x )),
321+ "width" : lmfit .Parameter ("width" , np . max (x ) - np . min (x )),
322322 }
323323
324324 return init_guess
@@ -429,8 +429,8 @@ def guess(
429429 ) -> dict [str , lmfit .Parameter ]:
430430 init_guess = {
431431 "cen" : lmfit .Parameter ("cen" , np .mean (x )),
432- "stretch" : lmfit .Parameter ("stretch" , (max (x ) - min (x )) / 2 ),
433- "scale" : lmfit .Parameter ("scale" , (max (y ) - min (y )) / 2 ),
432+ "stretch" : lmfit .Parameter ("stretch" , (np . max (x ) - np . min (x )) / 2 ),
433+ "scale" : lmfit .Parameter ("scale" , (np . max (y ) - np . min (y )) / 2 ),
434434 "background" : lmfit .Parameter ("background" , np .mean (y )),
435435 }
436436
@@ -466,8 +466,8 @@ def guess(
466466 ) -> dict [str , lmfit .Parameter ]:
467467 init_guess = {
468468 "cen" : lmfit .Parameter ("cen" , np .mean (x )),
469- "stretch" : lmfit .Parameter ("stretch" , (max (x ) - min (x )) / 2 ),
470- "scale" : lmfit .Parameter ("scale" , (max (y ) - min (y )) / 2 ),
469+ "stretch" : lmfit .Parameter ("stretch" , (np . max (x ) - np . min (x )) / 2 ),
470+ "scale" : lmfit .Parameter ("scale" , (np . max (y ) - np . min (y )) / 2 ),
471471 "background" : lmfit .Parameter ("background" , np .min (y )),
472472 }
473473
0 commit comments