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

Documentation branch #38

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

rpoudel1
Copy link
Member

Closes # .

Changes proposed in this pull request:

@@ -817,3 +857,16 @@ def subgraph_centrality(CIJ):
# compute eigenvector centr.
Cs = np.real(np.dot(vecs * vecs, np.exp(vals)))
return Cs # imaginary part from precision error

def Leverage_centrality:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to define functions with parentheses, even if they're empty. We also need to include the word "pass" when the function isn't running yet.

So instead of

def Leverage_centrality:
    """Documentation...
    """

we should have:

def Leverage_centrality():
    """Documentation...
    """
    pass


"""

def Delta_centrality (G):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function names should be lower snake case, so Delta_centrality --> delta_centrality, Degree_centrality --> degree_centrality, Leverage_centrality --> leverage_centrality.

"""
Node betweenness centrality is the fraction of all shortest paths in
the network that contain a given node. Nodes with high values of
betweenness centrality participate in a large number of shortest paths.



Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also don't want these extra spaces here.

@tsalo
Copy link
Member

tsalo commented Aug 16, 2018

These changes look good, but I'll hold off on merging the PR until we consolidate some functions and address the failing tests in other work.

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

Successfully merging this pull request may close these issues.

2 participants