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

block_reduce loses mask data #51

Open
marthinwurer opened this issue Oct 19, 2019 · 1 comment
Open

block_reduce loses mask data #51

marthinwurer opened this issue Oct 19, 2019 · 1 comment

Comments

@marthinwurer
Copy link

As per https://stackoverflow.com/a/56331273/3000741, using the scipy block reduce loses all mask information. This can cause lots of calculation errors. The one that I'm running into at the moment is with the CHELSEA dataset. When I try to block reduce, the masked array is filled with the no data value and the mean calculation is completely thrown off in blocks with masked pixels.

@ozak
Copy link
Owner

ozak commented Oct 29, 2019

Sorry @marthinwurer I have been busy so have not had time to look into this. If you can put some code to show the issue with the data you are using (or a subset of it) I may be able to look at it once I have some time. In the tests I had performed using the np.ma.sum or similar functions seemed to work correctly, but may have been just the use case I had. It would be good to ensure this is properly treated.

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

No branches or pull requests

2 participants