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

ENH: remove .apply in predict_transport_mode #596

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

bifbof
Copy link
Collaborator

@bifbof bifbof commented Jan 7, 2024

Just a small PR I came around to do.

  • replaced an .apply that assigns categories based on speed with the pd.cut function. This complicates the code a bit, but not that much. Moves basically all computation to pandas
  • removed an error if the input dictionary isn't sorted and instead just sort the input.

Copy link

codecov bot commented Jan 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (495443f) 93.30% compared to head (d55f398) 93.32%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #596      +/-   ##
==========================================
+ Coverage   93.30%   93.32%   +0.01%     
==========================================
  Files          33       33              
  Lines        2076     2067       -9     
  Branches      368      364       -4     
==========================================
- Hits         1937     1929       -8     
  Misses        127      127              
+ Partials       12       11       -1     

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

@bifbof bifbof changed the title TST: correct calculate_dist_matrix test ENH: remove .apply in predict_transport_mode Jan 7, 2024
Copy link
Member

@hongyeehh hongyeehh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change. imo the changed version is also easy to understand

@hongyeehh hongyeehh merged commit 8b3a337 into mie-lab:master Jan 7, 2024
8 checks passed
@bifbof bifbof deleted the transport_mode branch January 7, 2024 20:47
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.

2 participants