@@ -143,9 +143,13 @@ def __init__(
143143
144144 self ._check_effect_sign ()
145145
146- if ("h" , "b" ) & kwargs .keys ():
147- warnings .warn (f"Key-worded arguments contain: { ('h' , 'b' ) & kwargs .keys ()} . \n \
148- Iterative bandwidth selection will be overwritten by provided values." )
146+ if found_keys := {"h" , "b" } & kwargs .keys ():
147+ warnings .warn (
148+ (
149+ f"Key-worded arguments contain: { found_keys } .\n "
150+ "Iterative bandwidth selection will be overwritten by provided values."
151+ )
152+ )
149153
150154 self .kwargs = kwargs
151155
@@ -456,12 +460,16 @@ def _update_weights(self):
456460 def _fit_rdd (self , h = None , b = None ):
457461 if self .fuzzy :
458462 rdd_res = rdrobust .rdrobust (
459- y = self ._M_Y [:, self ._i_rep ], x = self ._score , fuzzy = self ._M_D [:, self ._i_rep ],
460- c = 0 , ** ({"h" : h , "b" : b } | self .kwargs )
463+ y = self ._M_Y [:, self ._i_rep ],
464+ x = self ._score ,
465+ fuzzy = self ._M_D [:, self ._i_rep ],
466+ c = 0 ,
467+ ** ({"h" : h , "b" : b } | self .kwargs ),
461468 )
462469 else :
463- rdd_res = rdrobust .rdrobust (y = self ._M_Y [:, self ._i_rep ], x = self ._score , fuzzy = None ,
464- c = 0 , ** ({"h" : h , "b" : b } | self .kwargs ))
470+ rdd_res = rdrobust .rdrobust (
471+ y = self ._M_Y [:, self ._i_rep ], x = self ._score , fuzzy = None , c = 0 , ** ({"h" : h , "b" : b } | self .kwargs )
472+ )
465473 return rdd_res
466474
467475 def _set_coefs (self , rdd_res , h ):
0 commit comments