wradlib.zonalstats.mask_from_bbox(x, y, bbox, polar=False)
Parameters: x (numpy.ndarray) – x (Cartesian) coordinates of shape (num rows, num columns) y (numpy.ndarray) – y (Cartesian) coordinates of shape (num rows, num columns) bbox (dict) – dictionary with keys “left”, “right”, “bottom”, “top” These must refer to the same Cartesian reference system as x and y polar (bool) – if True, x, y are aligned polar (azimuth x range) mask, shape (numpy.ndarray, tuple) – mask is a boolean array that is True if the point is inside the bbox, shape is the shape of the True subgrid