@@ -134,7 +134,7 @@ def _chandrupatla(func, a, b, *, args=(), xatol=None, xrtol=None,
134134 func , xs , fs , args , shape , dtype , xp = temp
135135 x1 , x2 = xs
136136 f1 , f2 = fs
137- status = xp .full_like (x1 , xp . asarray ( eim ._EINPROGRESS ) ,
137+ status = xp .full_like (x1 , eim ._EINPROGRESS ,
138138 dtype = xp .int32 ) # in progress
139139 nit , nfev = 0 , 2 # two function evaluations performed above
140140 finfo = xp .finfo (dtype )
@@ -218,7 +218,7 @@ def post_termination_check(work):
218218 j = ((1 - xp .sqrt (1 - xi1 )) < phi1 ) & (phi1 < xp .sqrt (xi1 ))
219219
220220 f1j , f2j , f3j , alphaj = work .f1 [j ], work .f2 [j ], work .f3 [j ], alpha [j ]
221- t = xp .full_like (alpha , xp . asarray ( 0.5 ) )
221+ t = xp .full_like (alpha , 0.5 )
222222 t [j ] = (f1j / (f1j - f2j ) * f3j / (f3j - f2j )
223223 - alphaj * f1j / (f3j - f1j ) * f2j / (f2j - f3j ))
224224
@@ -400,8 +400,7 @@ def _chandrupatla_minimize(func, x1, x2, x3, *, args=(), xatol=None,
400400 x1 , x2 , x3 = xs
401401 f1 , f2 , f3 = fs
402402 phi = xp .asarray (0.5 + 0.5 * 5 ** 0.5 , dtype = dtype )[()] # golden ratio
403- status = xp .full_like (x1 , xp .asarray (eim ._EINPROGRESS ),
404- dtype = xp .int32 ) # in progress
403+ status = xp .full_like (x1 , eim ._EINPROGRESS , dtype = xp .int32 ) # in progress
405404 nit , nfev = 0 , 3 # three function evaluations performed above
406405 fatol = xp .finfo (dtype ).smallest_normal if fatol is None else fatol
407406 frtol = xp .finfo (dtype ).smallest_normal if frtol is None else frtol
0 commit comments