Skip to content

Commit 2c242d2

Browse files
committed
removed unnecessary arguments in the lambda
1 parent 182f608 commit 2c242d2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

rl/gen_utils/common_funcs.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
VSML = 1e-8
44

55

6-
# noinspection PyShadowingNames,PyShadowingNames
76
def get_logistic_func(alpha: float) -> Callable[[float], float]:
8-
return lambda x, alpha=alpha: 1. / (1 + np.exp(-alpha * x))
7+
return lambda x: 1. / (1 + np.exp(-alpha * x))
98

109

11-
# noinspection PyShadowingNames,PyShadowingNames
1210
def get_unit_sigmoid_func(alpha: float) -> Callable[[float], float]:
13-
return lambda x, alpha=alpha: 1. / (1 + (1 / np.where(x == 0, VSML, x) - 1) ** alpha)
11+
return lambda x: 1. / (1 + (1 / np.where(x == 0, VSML, x) - 1) ** alpha)
1412

1513

1614
if __name__ == '__main__':

0 commit comments

Comments
 (0)