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

docs: Fix docstrings for ATAN2 and ATAN2D SQL functions #19351

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

janscholten
Copy link
Contributor

@janscholten janscholten commented Oct 21, 2024

The docs for ATAN2 and ATAN2D (SQL functions) were incorrect because they claimed to be dividing arg2/arg1 where it is actually the other way around.

Alternatively, one could swap the arguments in the implementation, but I like the implementation and it follows numpy.

Also, I changed the example in the docstring so that it uses lengths of 0, 1, or 2, and not the ambiguous "lengths" of 90, 360 etc.

@janscholten janscholten changed the title docs: fix docstrings for ATAN2 and ATAN2D SQL functions docs: Fix docstrings for ATAN2 and ATAN2D SQL functions Oct 21, 2024
@github-actions github-actions bot added documentation Improvements or additions to documentation python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Oct 21, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.21%. Comparing base (8a76dad) to head (50ff1fe).
Report is 47 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19351      +/-   ##
==========================================
- Coverage   80.24%   80.21%   -0.03%     
==========================================
  Files        1523     1523              
  Lines      209545   209795     +250     
  Branches     2434     2434              
==========================================
+ Hits       168148   168294     +146     
- Misses      40842    40946     +104     
  Partials      555      555              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@orlp
Copy link
Collaborator

orlp commented Oct 21, 2024

We should be consistent with the other SQL implementations. I believe most follow the convention atan2(y, x) ~ atan(y / x), so we should do that as well.

@janscholten
Copy link
Contributor Author

We should be consistent with the other SQL implementations. I believe most follow the convention atan2(y, x) ~ atan(y / x), so we should do that as well.

Agreed.

@ritchie46 ritchie46 merged commit 655dd0f into pola-rs:main Oct 25, 2024
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants