def rgb_array_to_int(mask):
    """Converts an RGB mask array to a 2D hex integer mask array.

    Args:
        mask: an RGB mask array

    Returns:
        a 2D integer mask array
    """
    return (
        np.left_shift(mask[:, :, 0], 16, dtype=int)
        + np.left_shift(mask[:, :, 1], 8, dtype=int)
        + mask[:, :, 2]
    )
Converts an RGB mask array to a 2D hex integer mask array.

    Args:
        mask: an RGB mask array

    Returns:
        a 2D integer mask array
    
fiftyone/core/fields.py