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

Drop compute_ from function names? #328

Open
niksirbi opened this issue Oct 18, 2024 · 0 comments
Open

Drop compute_ from function names? #328

niksirbi opened this issue Oct 18, 2024 · 0 comments
Labels
enhancement New optional feature

Comments

@niksirbi
Copy link
Member

All our functions for computing metrics derived from the data take the form compute_metric, for example:

  • compute_velocity()
  • compute_path_length()
  • compute_interindividual_distances()
  • compute_norm()

Pros:

  • consistency
  • being super explicit about this function invoking the computation of some variable

Cons:

  • Verbose
  • Makes code lines long (hence more commands have to be split across lines)
  • Is somewhat redundant? Most python users understand that calling a foo() (with brackets) will trigger some computation (as apposed to object.property)

I can't think of many packages that something similar to this, happy to change my mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New optional feature
Projects
Status: 🤔 Triage
Development

No branches or pull requests

1 participant