Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom math functions #4860

Merged
merged 2 commits into from
Jul 13, 2021

Conversation

ricardoV94
Copy link
Member

This PR removes the custom logaddexp, logsumexp, and log1pexp functions and deprecates log1mexp in favor of Aesara implementations.

A deprecation warning is added for log1mexp (and the numpy counterpart) because the Aesara function, more logically, expects a negative input.

Also fixed a bug in log1mexp_numpy when the input was an integer.

Closes #4747

@ricardoV94 ricardoV94 force-pushed the remove_custom_math_functions branch 2 times, most recently from 035e104 to ca569a4 Compare July 13, 2021 07:36
@codecov
Copy link

codecov bot commented Jul 13, 2021

Codecov Report

Merging #4860 (9fd2b51) into main (0b1ecdb) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4860      +/-   ##
==========================================
+ Coverage   72.11%   72.16%   +0.04%     
==========================================
  Files          85       85              
  Lines       13739    13736       -3     
==========================================
+ Hits         9908     9912       +4     
+ Misses       3831     3824       -7     
Impacted Files Coverage Δ
pymc3/distributions/continuous.py 96.04% <100.00%> (ø)
pymc3/distributions/discrete.py 98.97% <100.00%> (ø)
pymc3/math.py 67.85% <100.00%> (-0.49%) ⬇️
pymc3/step_methods/hmc/nuts.py 97.50% <0.00%> (+0.62%) ⬆️
pymc3/parallel_sampling.py 88.21% <0.00%> (+1.01%) ⬆️
pymc3/backends/report.py 91.60% <0.00%> (+2.09%) ⬆️

RELEASE-NOTES.md Outdated Show resolved Hide resolved
pymc3/math.py Outdated Show resolved Hide resolved
pymc3/math.py Show resolved Hide resolved
@ricardoV94 ricardoV94 force-pushed the remove_custom_math_functions branch from ca569a4 to f516009 Compare July 13, 2021 09:37
…deprecate `log1mexp` in favor of Aesara implementations.

Closes pymc-devs#4747
@ricardoV94 ricardoV94 force-pushed the remove_custom_math_functions branch from f516009 to b14d303 Compare July 13, 2021 09:45
@ricardoV94 ricardoV94 merged commit 83c5a30 into pymc-devs:main Jul 13, 2021
@ricardoV94 ricardoV94 deleted the remove_custom_math_functions branch July 13, 2021 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove explicit optimization from math.logsumexp
2 participants