docs: def all_true(a, indexes):
      '''Find which vectors have all-true elements
      
      Given an array, "a" and indexes into the first elements of vectors
      within that array, return an array where each element is true if
      all elements of the corresponding vector are true.
      
      Example: a = [ 1,1,0,1,1,1,1], indexes=[0,3]
               vectors = [[1,1,0],[1,1,1,1]]
               return = [False, True]
      '''
      if len(indexes) == 0:
          return np.zeros(0,bool)
      elif len(indexes) == 1:
          return np.all(a)
      cs = np.zeros(len(a)+1,int)
      cs[1:] = np.cumsum(a)
      augmented_indexes = np.zeros(len(indexes)+1, int)
      augmented_indexes[0:-1] = indexes + 1
      augmented_indexes[-1] = len(a) + 1
      counts = augmented_indexes[1:]-augmented_indexes[0:-1]
      hits = cs[augmented_indexes[1:]-1] - cs[augmented_indexes[0:-1]-1]
      return counts == hits