masked_array(
data=[[--, --, --, --],
[--, --, --, --],
[8, 9, 10, 11],
[12, 13, 14, 15],
[16, 17, 18, 19],
[20, 21, 22, 23]],
mask=[[ True, True, True, True],
[ True, True, True, True],
[False, False, False, False],
[False, False, False, False],
[False, False, False, False],
[False, False, False, False]],
fill_value=999999)
which is not at all what I would expect (and I get this result even if I broadcast the mask before applying it).
✨ Feature Request
It looks like the
mask_cubefunction was added as a convenience as part of a larger change (#3144). However, now it's in the public API, users are having a go with it but not finding it ideal. Here are a few ideas for improvement that I think would be fairly easy to implement:cubeandpoints_to_maskmust be 2D but, looking at the code, I can't see why it wouldn't work as long as they are the same shape. So at very least, the docstring should be updated.dim_map, so the function could broadcast the mask out viairis.util.broadcast_to_shape.gives
which is not at all what I would expect (and I get this result even if I broadcast the mask before applying it).
Additional context
See also #3717