Skip to content

Conversation

quentinblampey
Copy link

Hello @flying-sheep @Zethson,

As mentioned in #112, I added support for min/max, but I'm unsure about my implementation, notably regarding code quality:

  • The code is highly similar to the sum function, but it has some minor differences due to the fact that the min/max operations don't use the dtype argument. I think I could potentially make a function that is generic enough to handle all these "simple" operations at once, but I'm worried it would become too abstract and complex to read/maintain. What do you think?
  • Two functions (normalize_axis and get_shape) are shared for sum and min/max, so I wanted to check with you where we should move them. E.g., I can create stats/_utils.py?
  • The docs and tests are still missing, but I want to first check with you the above point and then I'll add these

Closes #112

Copy link

codecov bot commented Aug 27, 2025

Codecov Report

❌ Patch coverage is 28.37838% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.62%. Comparing base (6645ead) to head (ddc450b).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/fast_array_utils/stats/_min_max.py 27.94% 49 Missing ⚠️
src/fast_array_utils/stats/__init__.py 33.33% 4 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (6645ead) and HEAD (ddc450b). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (6645ead) HEAD (ddc450b)
6 5
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #116       +/-   ##
===========================================
- Coverage   98.32%   85.62%   -12.70%     
===========================================
  Files          17       18        +1     
  Lines         417      494       +77     
===========================================
+ Hits          410      423       +13     
- Misses          7       71       +64     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

codspeed-hq bot commented Aug 27, 2025

CodSpeed Performance Report

Merging #116 will not alter performance

Comparing quentinblampey:minmax (ddc450b) with main (f2102e0)

Summary

✅ 160 untouched benchmarks

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.

Support min/max
1 participant