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

to_16_point optimization in metno.py file #925

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ManchurianMan
Copy link

Updated to_16_point function in metno.py

Changes:

Improved readability and efficiency.
Added a docstring explaining the input and output of the function.

Comparison:

Accuracy: Verified against the original function across all 360 degrees (both integers and floats). Outputs match.

Speed: Tested using the timeit module at 1,000,000 iterations:

  • to_16_point_v1: 0.13851 seconds
  • to_16_point_v2: 0.12557 seconds

Motivation:

I'm contributing to open source to give back to the community. This change, while small, is a step towards improving wttr.in. Feedback is appreciated!

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