From https://github.com/igraph/igraph/issues/837#issuecomment-118006440
From igraph/igraph#837 (comment)