Skip to content

Ensure valid range for arccos function -1 to 1 #4

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alanpawlak
Copy link

It is generally a good practice to use np.clip(x, -1, 1) before passing the input to np.arccos to ensure that the input is within the valid range for the function (-1 to 1). This is because the arccos function is only defined for values between -1 and 1, so passing in a value outside of this range can result in unexpected behavior or errors.

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.

1 participant