<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def slot_availability_array(events, slots):
 """ Return a numpy array mapping events to slots - Rows corresponds to events - Columns correspond to stags Array has value 0 if event cannot be scheduled in a given slot (1 otherwise) """

    array = np.ones((len(events), len(slots)))
    for row, event in enumerate(events):
        for col, slot in enumerate(slots):
            if slot in event.unavailability or event.duration > slot.duration:
                array[row, col] = 0
    return array