-
Notifications
You must be signed in to change notification settings - Fork 13
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 numerical constants pi, e, Euler's gamma, and imaginary I #12
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits aside, this LGTM.
The CI failure looks a little odd, I think that's unrelated. Let me see if I can fix that.
From a quick search, I believe changing isort 5.10.1 to a newer version might fix this (source) see also: https://github.com/PyCQA/isort/releases/tag/5.11.5 |
Alright, try rebasing on top of the new main and I think the CI should be fixed. :) |
@patrick-kidger nice (love the switch to ruff and pyproject.toml btw)! Okay, I've updated my PR with the changes you mentioned, let me know how it looks. update: oops, not sure why the pre-commit didn't do the formatting but I've run |
Marvellous! Just merged. |
Thank you! |
Addresses #6 and adds some other nice constants. For example, you should now be able to run the following without error:
I've also written a unit test for these constants, although I had to use
jnp.isclose
rather than==
I believe because of some type conversions. If someone knows how to make this nicer, please do so!