Commit c65210b4 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Properly parse some degree arguments, which can also be properies

parent d5356666
...@@ -782,8 +782,8 @@ class Graph(object): ...@@ -782,8 +782,8 @@ class Graph(object):
def average_combined_vertex_correlation(self, degree1, degree2): def average_combined_vertex_correlation(self, degree1, degree2):
"""Get the average of degree2 in function of degree1. Scalar properties """Get the average of degree2 in function of degree1. Scalar properties
are also accepted as degree1 or degree2""" are also accepted as degree1 or degree2"""
return self.__graph.GetAverageCombinedVertexCorrelation(degree1, f = self.__graph.GetAverageCombinedVertexCorrelation
degree2) return f(_degree(degree1), _degree(degree2))
@_attrs(opt_group=__groups[-1], has_output=True) @_attrs(opt_group=__groups[-1], has_output=True)
@_handle_exceptions @_handle_exceptions
...@@ -794,8 +794,8 @@ class Graph(object): ...@@ -794,8 +794,8 @@ class Graph(object):
passed by weight""" passed by weight"""
if weight == None: if weight == None:
weight = "" weight = ""
self.__graph.GetVertexCorrelationHistogram(origin_degree, f = self.__graph.GetVertexCorrelationHistogram
neighbour_degree, weight) return f(_degree(origin_degree), _degree(neighbour_degree), weight)
@_attrs(opt_group=__groups[-1], has_output=True) @_attrs(opt_group=__groups[-1], has_output=True)
@_handle_exceptions @_handle_exceptions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment