Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Changed behavior of Graph.Biadjacency in igraph 1.0 #863

Copy link
Copy link

Description

@jboynyc
Issue body actions

Describe the bug

Creating a bipartite graph from a biadjacency matrix works in subtly different ways in igraph 0.11 and 1.0.

To reproduce

import numpy as np

m = np.array(range(1, 10)).reshape(3,3)

import igraph as ig

ig.__version__
# => '0.11.8'

ig.Graph.Biadjacency(m.tolist(), weighted=True).es["weight"]
# => [1, 2, 3, 4, 5, 6, 7, 8, 9]

ig.__version__
# => '1.0.0'

ig.Graph.Biadjacency(m.tolist(), weighted=True).es["weight"]
# => [1, 4, 7, 2, 5, 8, 3, 6, 9]

The behavior in igraph 1.0 is the equivalent of calling Graph.Biadjacency on the transposed biadjacency matrix in igraph 0.11:

ig.Graph.Biadjacency(m.T.tolist(), weighted=True).es["weight"]
# => [1, 4, 7, 2, 5, 8, 3, 6, 9]

Version information

0.11.8 and 1.0

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.