deepsnap
deepsnap copied to clipboard
mostly cosmetic, adding some type hints, and clarifying comments
thanks @zechengz . i see, looks like snapx
comes as a part of snap
which is the pypi package snap-stanford
?
what do you think about this:
GraphType = Union[nx.Graph, sx.Graph]
...
def __init__(self, G: Optional[GraphType] = None, netlib=None, **kwargs):
also again totally ok if you prefer it the way it is. adding the type hint makes it more clear for me when i'm reading the code but i understand if it's in the way.
@zechengz lmk if you like the suggestion above, otherwise i can drop the type params and we can merge this. thanks!
thanks @zechengz . i see, looks like
snapx
comes as a part ofsnap
which is the pypi packagesnap-stanford
?what do you think about this:
GraphType = Union[nx.Graph, sx.Graph] ... def __init__(self, G: Optional[GraphType] = None, netlib=None, **kwargs):
also again totally ok if you prefer it the way it is. adding the type hint makes it more clear for me when i'm reading the code but i understand if it's in the way.
Sorry about the late reply. Thanks, it looks good to me. Yes, currently snapx is part of the the pypi package snap-stanford, which has a similar interface with the networkx. If you are interested, one example deepsnap supports snapx is https://github.com/snap-stanford/deepsnap/blob/master/examples/node_classification_cora.py
thanks @zechengz , just made the change. lmk if you have any other feedback i should consider.