code: def array(events, slots, objective_function=None, solver=None, **kwargs):
      
      return conv.solution_to_array(
          solution(events, slots, objective_function, solver=solver, **kwargs),
          events, slots
      )
docs: Compute a schedule in array form
  
      Parameters
      ----------
      events : list or tuple
          of :py:class:`resources.Event` instances
      slots : list or tuple
          of :py:class:`resources.Slot` instances
      objective_function : callable
          from lp_problem.objective_functions
  
      Returns
      -------
      np.array
          An E by S array (X) where E is the number of events and S the
          number of slots. Xij is 1 if event i is scheduled in slot j and
          zero otherwise
  
      Example
      -------
      For 3 events, 7 slots and a solution where
  
          * event 0 is scheduled in slot 1
          * event 1 is scheduled in slot 4
          * event 2 is scheduled in slot 5
  
      the resulting array would be::
  
          [[0, 1, 0, 0, 0, 0, 0],
           [0, 0, 0, 0, 1, 0, 0],
           [0, 0, 0, 0, 0, 1, 0]]