array([[True, True, True, False, False, False], [False, False, False, True,
    False, False], [False, False, False, False, True, True]], dtype=bool)
Product of array elements by group in numpy (Python)