verify_embedding(emb, source, target, ignore_errors=())[source]#

A simple (exception-raising) diagnostic for minor embeddings.

See diagnose_embedding() for a more detailed diagnostic and more information.

  • emb (dict) – A mapping of source nodes to arrays of target nodes as a dict of form {s: [t, …], …}, where s is a source-graph variable and t is a target-graph variable.

  • source (graph or edgelist) – Graph to be embedded

  • target (graph or edgelist) – Graph being embedded into


EmbeddingError – A catch-all class for the following errors: MissingChainError: A key is missing from emb or the associated chain is empty. ChainOverlapError: Two chains contain the same target node. DisconnectedChainError: A chain is disconnected. InvalidNodeError: A chain contains a node label not found in target. MissingEdgeError: A source edge is not represented by any target edges.


True if no exception is raised.

Return type: