code: def number_of_changes(slots, events, original_schedule, X, **kwargs):
      
      changes = 0
      original_array = schedule_to_array(original_schedule, events=events,
                                         slots=slots)
      for row, event in enumerate(original_array):
          for col, slot in enumerate(event):
              if slot == 0:
                  changes += X[row, col]
              else:
                  changes += 1 - X[row, col]
      return changes
docs: A function that counts the number of changes between a given schedule
      and an array (either numpy array of lp array).