minor, but ``izip`` should avoid two traversals of the data