`inertia.extend(_hierarchical.WeightedEdge(d, ind, r) for ...)` should be faster and is more idiomatic.