code: def independent(repertoire):
      
      marginals = [marginal(repertoire, i) for i in range(repertoire.ndim)]
  
      # TODO: is there a way to do without an explicit iteration?
      joint = marginals[0]
      for m in marginals[1:]:
          joint = joint * m
  
      # TODO: should we round here?
      # repertoire = repertoire.round(config.PRECISION)
      # joint = joint.round(config.PRECISION)
  
      return np.array_equal(repertoire, joint)
docs: Check whether the repertoire is independent.