Mathias Hauser

Results 175 comments of Mathias Hauser

These thoughts are not finished but I need to stop now. --- Coding this is not very difficult but to decide how "magical" this should behave because there will be...

My current feeling is to implement #293 first and then add an option (either `regionmask.set_options(use_cf=None)` or `mask(..., use_cf=None)` with the options: - `None` -> use cf_xarray if it's unambiguous -...

Thanks for the PR! There are some things missing. Should not be too much work I hope. Let me know if you need help with anything. - [ ] The...

Ok, #95 is fixed - could you please merge master. I also checked the 50m states/provinces. They only include some countries (US/ Canada/ Australia, ...) so I think it does...

Yes, the advantage of `groupby` is that it only reduces over the relevant gridcells. But I am surprised that `weighted` is so much slower - I need to test this....

I think that should be ```python ar6_land = regionmask.defined_regions.a6.land ar6_land.reduce(ds, weights=weights).mean() ``` and implemented as ```python class Reduce: def __init__(self, regions, data, weights=None, ...): self.mask_3D = regions.mask_3D(data, ...) self.weights =...

Check https://www.fatiando.org/pooch/latest/

Potential fix, use a `Path` instead of a `LineCollection`: https://github.com/regionmask/regionmask/blob/f14aa559036b84eb1b249390b83067506149f479/regionmask/core/plot.py#L44-L53 Potentially need to add a `Path.CLOSEPOLY` code. https://matplotlib.org/stable/tutorials/advanced/path_tutorial.html#sphx-glr-tutorials-advanced-path-tutorial-py

The following two functions work (with a slightly different look [rounded edges or not]). The mistake in https://github.com/regionmask/regionmask/blob/e5416cc03027c69a0b1a451860c4028d43dadc21/regionmask/core/plot.py#L50 is the missing `closed=True`. ```python def _draw_poly_collection(ax, polygons, **kwargs): from matplotlib.collections import...

However, I'd need to update the tests...