823906a3efcf66897eac8a4c89052d9153bca49e,pymc3/math.py,,log1mexp_numpy,#Any#,240
Before Change
For details, see
https://cran.r-project.org/web/packages/Rmpfr/vignettes/log1mexp-note.pdf
return np.where(x < 0.6931471805599453, np.log(-np.expm1(-x)), np.log1p(-np.exp(-x)))
def flatten_list(tensors):
return tt.concatenate([var.ravel() for var in tensors])
After Change
https://cran.r-project.org/web/packages/Rmpfr/vignettes/log1mexp-note.pdf
x = np.asarray(x)
out = np.empty_like(x)
mask = x < 0.6931471805599453 // log(2)
out[mask] = np.log(-np.expm1(-x[mask]))
mask = ~mask
out[mask] = np.log1p(-np.exp(-x[mask]))
return out
def flatten_list(tensors):
return tt.concatenate([var.ravel() for var in tensors])
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances Project Name: pymc-devs/pymc3
Commit Name: 823906a3efcf66897eac8a4c89052d9153bca49e
Time: 2021-01-22
Author: 28983449+ricardoV94@users.noreply.github.com
File Name: pymc3/math.py
Class Name:
Method Name: log1mexp_numpy
Project Name: mariogeiger/se3cnn
Commit Name: aa7c004df5c781fc3b5b8131d7a9e64fd196203e
Time: 2018-05-26
Author: geiger.mario@gmail.com
File Name: se3_cnn/non_linearities/scalar_activation.py
Class Name: ScalarActivation
Method Name: forward
Project Name: matplotlib/matplotlib
Commit Name: 85853dafddaf2afa2a77fd9984c06b62f842509a
Time: 2017-11-26
Author: quantum.analyst@gmail.com
File Name: lib/matplotlib/projections/geo.py
Class Name: AitoffTransform
Method Name: transform_non_affine
Project Name: librosa/librosa
Commit Name: c642d7d1d43a27ee9972d8ade8d4e77e28b5328f
Time: 2015-01-05
Author: brian.mcfee@nyu.edu
File Name: librosa/util.py
Class Name:
Method Name: match_events
Project Name: pymc-devs/pymc3
Commit Name: 823906a3efcf66897eac8a4c89052d9153bca49e
Time: 2021-01-22
Author: 28983449+ricardoV94@users.noreply.github.com
File Name: pymc3/math.py
Class Name:
Method Name: log1mexp_numpy