Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same edge name ? #106

Closed
vsraptor opened this issue Dec 4, 2022 · 1 comment
Closed

Same edge name ? #106

vsraptor opened this issue Dec 4, 2022 · 1 comment

Comments

@vsraptor
Copy link

vsraptor commented Dec 4, 2022

Is it possible for edges with the same name but different nodes to coexist. Something like this :

{
  "is" : ["red","apple","rotten"],
  "is" : ["black","pen"]
}

How do you achieve this ?

@brendapraggastis
Copy link
Collaborator

@vsraptor You cannot create a hypergraph where two edges have the same unique identifier. You can draw a hypergraph with the same label on the edges though:

d = {0 : ["red","apple","rotten"], 1 : ["black","pen"]}
h = hnx.Hypergraph(d)
hnx.draw(h,edge_labels={0:"is",1:"is"},edge_labels_kwargs={'fontsize':15})

Screen Shot 2021-08-12 at 5 54 43 PM

You can also attach properties to each hyperedge that store "is" as data. This will be easier in our next release.

bonicim added a commit that referenced this issue Aug 25, 2023
Merge in HYP/hypernetx from bugfix/HYP-342-fix-documents-ci-pipeline-on-github to develop

* commit '42dfcd838f191ba7cb11623b704fe392fc4b2f71':
  HYP-342 Update GH Workflows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants