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

Add common numpy transforms to extra_namespace #589

Merged
merged 1 commit into from
Nov 23, 2022

Conversation

tomicapretto
Copy link
Collaborator

Adds the following transformations

  • log()
  • log2()
  • log10()
  • exp()
  • exp2()
  • abs()

Previously

import numpy as np
model = bmb.Model("y ~ np.log(x)", data)

Now

model = bmb.Model("y ~ log(x)", data)

Closes #587

@tomicapretto
Copy link
Collaborator Author

I think the failing test is because pymc-devs/pymc#6291 in PyMC, which is included in the v4.4 release of PyMC. Will fix it in another PR but need to think about it since Bambi requests PyMC > 4 and this would bring problems with PyMC < 4.4

@tomicapretto tomicapretto merged commit 678f648 into bambinos:main Nov 23, 2022
@tomicapretto tomicapretto deleted the add_numpy_transforms branch November 23, 2022 17:51
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.

Make common transformations available in Bambi
1 participant