Closed helsharif closed 5 months ago
Hello, Below I'm adding a screenshot of the warning messages I get when running pixel_overlaps and aggregate even with silent=True
Yeah fair -
Looks like there are a few causes of that
.dims
instead of .sizes
(easy enough to fix)print()
calls xagg
warning as well.I'll see if I can fix that in the next version.
In the interim,
import warnings
with warnings.catch_warnings():
warnings.filterwarnings('ignore')
[xagg code here]
Should get rid of at least the warnings.
https://github.com/ks905383/xagg/pull/63#issuecomment-1954112998
One subfunction still doesn't have silent
piped into it. This is through this line https://github.com/ks905383/xagg/blob/db8df95664c2ccceae4ad1f7dd5fb711af07bc38/xagg/core.py#L616, which should have silent=silent
show up in the subset_find()
call.
@helsharif can you confirm this is the only place where silent=True
is still not producing the desired results?
Hi, yes I confirm. It seems like the other warning messages have gone away with the latest version. The only messages I still see are: "adjusting grid... (this may happen because only a subset of pixels were used for aggregation for efficiency - i.e. [subset_bbox=True] in xa.pixel_overlaps())" and "grid adjustment successful"
@helsharif sorry for the delay - I think it should now be fixed in v0.3.2.1. You can also now set silent=True as a global option with
xa.set_options(silent=True)
.
Let me know if it doesn't work!
Thanks! Yes it is working and the extra messages are suppressed. I just started a new project that involves a lot of use of xagg today, so this is a big help! Best regards. I think it is safe to close this thread.
thanks!
Hello, In using pixel_overlaps and aggregate functions I include silent=True, but I still get the same messages printed to the screen whether I include that or not. I was expecting for there to be no output to screen.