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

Make map conversions more efficient alternative #191

Merged
merged 4 commits into from May 24, 2022

Conversation

jarq6c
Copy link
Collaborator

@jarq6c jarq6c commented May 3, 2022

This is an alternative to #188 . This PR removes the conversion step when checking contingency tables, resulting in much faster computations for categorical metrics.

Additions

  • None

Removals

  • convert_mapping_values

Changes

  • contingency tables are converted directly to pandas.Series of the appropriate type.

Testing

  1. Removed test for convert_mapping_values

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • PR is well outlined and documented. See #12 for an example
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (see CONTRIBUTING.md)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output) using numpy docstring formatting
  • Placeholder code is flagged / future todos are captured in comments
  • Reviewers requested with the Reviewers tool ➡️

@jarq6c jarq6c added the enhancement New feature or request label May 3, 2022
@jarq6c jarq6c requested a review from groutr May 3, 2022 18:06
@jarq6c jarq6c self-assigned this May 3, 2022
@jarq6c
Copy link
Collaborator Author

jarq6c commented May 3, 2022

@groutr hopefully you don't mind reviewing this PR? :)

@jarq6c
Copy link
Collaborator Author

jarq6c commented May 24, 2022

@aaraney any comments on this?

@aaraney
Copy link
Member

aaraney commented May 24, 2022

@aaraney any comments on this?

Looks good! Thanks for tagging me!

@jarq6c jarq6c merged commit f352ae2 into NOAA-OWP:main May 24, 2022
@jarq6c jarq6c deleted the eff_mapping branch May 24, 2022 20:43
@jarq6c
Copy link
Collaborator Author

jarq6c commented May 24, 2022

These tests passed locally and also passed on GH prior to pip version 22.1. The tests on main will pass once #169 is merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants