File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ def log1mexp(x):
226
226
For details, see
227
227
https://cran.r-project.org/web/packages/Rmpfr/vignettes/log1mexp-note.pdf
228
228
"""
229
- return tt .switch (tt .lt (x , 0.693147 ), tt .log (- tt .expm1 (- x )), tt .log1p (- tt .exp (- x )))
229
+ return tt .switch (tt .lt (x , 0.6931471805599453 ), tt .log (- tt .expm1 (- x )), tt .log1p (- tt .exp (- x )))
230
230
231
231
232
232
def log1mexp_numpy (x ):
@@ -235,7 +235,7 @@ def log1mexp_numpy(x):
235
235
For details, see
236
236
https://cran.r-project.org/web/packages/Rmpfr/vignettes/log1mexp-note.pdf
237
237
"""
238
- return np .where (x < 0.693147 , np .log (- np .expm1 (- x )), np .log1p (- np .exp (- x )))
238
+ return np .where (x < 0.6931471805599453 , np .log (- np .expm1 (- x )), np .log1p (- np .exp (- x )))
239
239
240
240
241
241
def flatten_list (tensors ):
You can’t perform that action at this time.
0 commit comments