Are you suggesting something like this?
aggregated_coverage = np.sum(contig_to_size[contigs] * contig_to_coverage[contigs])
genome_to_coverage[id_genome] = aggregated_coverage/genome_size
Wouldn't this over estimate the coverage because it would imply that a read covers the entire contig? I just ran it for my genomes and in some cases I'm getting 5623X which seems like a lot.