-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
More inplace #45
More inplace #45
Conversation
Reviewer's Guide by SourceryThis pull request adds inplace operation support to various image processing functions by modifying the clip function and adding inplace parameters to several operations. The changes primarily affect array operations like add, multiply, and normalize. Class diagram for updated image processing functionsclassDiagram
class functions {
+add_weighted_simsimd(np.ndarray img1, float weight1, np.ndarray img2, float weight2)
+apply_lut(np.ndarray img, ...)
+multiply(np.ndarray img, ValueType value, bool inplace)
+add_opencv(np.ndarray img, np.ndarray|float value, bool inplace)
+add_numpy(np.ndarray img, np.ndarray|float value)
+add_lut(np.ndarray img, np.ndarray|float value, bool inplace)
+add_constant(np.ndarray img, float value, bool inplace)
+add_vector(np.ndarray img, np.ndarray value, bool inplace)
+add_array(np.ndarray img, np.ndarray value, bool inplace)
+add(np.ndarray img, ValueType value, bool inplace)
+normalize_numpy(np.ndarray img, float|np.ndarray mean, float|np.ndarray denominator)
+add_weighted_numpy(np.ndarray img1, float weight1, np.ndarray img2, float weight2)
+add_weighted_opencv(np.ndarray img1, float weight1, np.ndarray img2, float weight2)
+add_weighted_lut(np.ndarray img1, float weight1, np.ndarray img2, float weight2, bool inplace)
+multiply_add_lut(np.ndarray img, ValueType factor, ValueType value, bool inplace)
+to_float(np.ndarray img, float|None max_value)
+from_float_numpy(np.ndarray img, np.dtype target_dtype, float|None max_value)
}
class utils {
+clip(np.ndarray img, Any dtype, bool inplace)
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #45 +/- ##
=======================================
Coverage ? 57.99%
=======================================
Files ? 20
Lines ? 2226
Branches ? 0
=======================================
Hits ? 1291
Misses ? 935
Partials ? 0 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ternaus - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Enhance image processing functions to support in-place operations, improving memory efficiency. Update pre-commit hooks to newer versions and add comprehensive benchmark tests for performance evaluation. Update documentation to reflect these changes and improvements.
Enhancements:
Build:
Documentation:
Tests: