@@ -143,9 +143,13 @@ def __init__(
143
143
144
144
self ._check_effect_sign ()
145
145
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
+ )
149
153
150
154
self .kwargs = kwargs
151
155
@@ -456,12 +460,16 @@ def _update_weights(self):
456
460
def _fit_rdd (self , h = None , b = None ):
457
461
if self .fuzzy :
458
462
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 ),
461
468
)
462
469
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
+ )
465
473
return rdd_res
466
474
467
475
def _set_coefs (self , rdd_res , h ):
0 commit comments