You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd expect convert.convert_to_hypergraph to ALWAYS return a hypergraph. However:
In [2]: xgi.convert_to_hypergraph([{1,2,3},{2,3},{3,4}])
In [3]: xgi.convert_to_hypergraph([{1,2,3},{2,3},{3,4}], create_using=xgi.Hypergraph)
In [4]: xgi.convert_to_hypergraph([{1,2,3},{2,3},{3,4}], create_using=xgi.Hypergraph())
In [5]: xgi.convert_to_hypergraph(None)
Out[5]: <xgi.classes.hypergraph.Hypergraphat0x7faf87067190>
Only the last one has a return value! This is because convert_to_hypergraph is designed to be used alongside create_using, and populate the passed in hypergraph in-place. This is far from ideal, I'd say. We should redesign the interface of this and other functions in the convert module.
The text was updated successfully, but these errors were encountered:
I'd expect
convert.convert_to_hypergraph
to ALWAYS return a hypergraph. However:Only the last one has a return value! This is because
convert_to_hypergraph
is designed to be used alongsidecreate_using
, and populate the passed in hypergraph in-place. This is far from ideal, I'd say. We should redesign the interface of this and other functions in theconvert
module.The text was updated successfully, but these errors were encountered: