Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork366
fix: check for non-int 0 fill values#3345
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecovbot commentedAug 6, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #3345 +/- ##==========================================- Coverage 61.86% 61.85% -0.01%========================================== Files 85 85 Lines 10111 10112 +1 ========================================== Hits 6255 6255- Misses 3856 3857 +1
🚀 New features to boost your workflow:
|
to test this, could we perhaps patch |
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.
Looks good to me - needs a release note entry, and I left one suggestion to improve the test too.
| @pytest.mark.parametrize("dtype", [np.int8,np.uint16,np.float32,int,float]) | ||
| @pytest.mark.parametrize("fill_value", [None,0,1]) |
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.
| @pytest.mark.parametrize("fill_value", [None,0,1]) | |
| @pytest.mark.parametrize("fill_value", [None,0,0.0,1]) |
Worth explicitly including a float here?
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.
I think everything is cast anyway bydtype, so it shouldn't matter, no?
I've done some digging into this topic, I'll post in a bit but I would like to hold off on merging for a bit. |
Ok apologies, I know that Tom's PR supercedes this in many ways but for anyone curious, my worry was about how memory is allocated. I learned that importnumpyasnpbuf=np.arange(100_000,dtype=np.float64)# cell 1%%timeitfull=np.full((1_000_000,),0,dtype=np.float64)full[900_000:]=buf# cell 2%%timeitzeros=np.zeros((1_000_000,),dtype=np.float64)zeros[900_000:]=buf# cell 3%%timeitfull=np.full((1_000_000,),0,dtype=np.float64)full.sum()# cell 4%%timeitzeros=np.zeros((1_000_000,),dtype=np.float64)zeros.sum() ![]() |

Uh oh!
There was an error while loading.Please reload this page.
A bit of an "oops" from me, but hopefully this is more robust (than#3082)! It worked for my one example but testing this without using a spy object seems impossible (happy to contribute that though, or some other test).
TODO:
docs/user-guide/*.rstchanges/