Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #116 +/- ##
==========================================
+ Coverage 98.33% 99.13% +0.80%
==========================================
Files 17 19 +2
Lines 421 464 +43
==========================================
+ Hits 414 460 +46
+ Misses 7 4 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi! Thanks for the PR! I did some of the deduplication, but all function bodies are identical except for the existence/non-existence of but I can do that later. |
|
Hi @flying-sheep, A few comments:
>>> import dask.array as da
>>> from fast_array_utils import stats
>>> x = da.random.random((1000, 1000), chunks=(100, 100))
>>> stats.sum(x).compute(), stats.sum(x, dtype=int).compute()
(np.float64(500227.801967892), np.int64(500173)) # large difference
>>> x.sum(dtype=int).compute()
0 # convert to int before summing |
|
Hi! I’m also responding late, since I was on a hackathon last week!
Probably not, I assume that
maybe no better way than to go back to manual
What numpy does is this:
ah, looks like we don’t test I guess that’s a bug then! #124 |
|
OK, new info here:
so we’re also circumventing the bug for scipy, which makes the |
|
Thanks for the in-depth analysis @flying-sheep, and good catch for the scipy bug! |
|
once the other PR is merged, I think we can progress here! Except for the overloads: I still don’t have a good idea on how to get them both into the docs and the typing without repeating ourselves. |
|
OK, I think I merged it all in, now we just need to fix mypy and the docs and this should be ready! |
|
Hi @flying-sheep, I'm still not sure what the best way is to handle the docs |
|
I’ll tackle it, thank you! |
|
Thanks for your help @flying-sheep! |
|
Awesome!🎉 |
|
thank you! |
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:
sumfunction, but it has some minor differences due to the fact that the min/max operations don't use thedtypeargument. 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?normalize_axisandget_shape) are shared forsumandmin/max, so I wanted to check with you where we should move them. E.g., I can createstats/_utils.py?Closes #112