The problem is that i have this function:
def fuerza_repulsion(x):
area = 100 * 100
k = math.sqrt(area / len(self.grafo[0]))
return ((k**2 / x) * c2)
It looks like your function is part of a class, in which case the first argument of the function needs to be self
, the class object itself. (Also, as @SRC pointed out, you generally call class functions 'methods')
So therefore use:
def fuerza_repulsion(self, x):
area = 100 * 100
k = math.sqrt(area / len(self.grafo[0]))
return ((k**2 / x) * c2)