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

return array in std_mean #221

Merged
merged 1 commit into from
Jan 9, 2025
Merged

return array in std_mean #221

merged 1 commit into from
Jan 9, 2025

Conversation

edgarriba
Copy link
Member

This pull request includes changes to the crates/kornia-imgproc/src/core.rs file to improve the performance and readability of the std_mean function by using fixed-size arrays instead of vectors. Additionally, the test code has been updated to reflect these changes.

Changes to std_mean function:

  • Modified the return type of std_mean from Vec<f64> to [f64; 3] for both standard deviation and mean values.
  • Replaced the calculation of mean and variance from using vectors to using fixed-size arrays for better performance and readability.

Updates to test code:

  • Updated the test code to use fixed-size arrays for expected standard deviation and mean values, improving consistency with the updated std_mean function.

@edgarriba edgarriba merged commit ac71d54 into main Jan 9, 2025
11 checks passed
@edgarriba edgarriba deleted the std-mean-array branch January 9, 2025 13:06
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