```
def CalcCentre(data):
centre = array([0,0,0])
count = 0
for p in data:
centre = add(centre, array(p[:3]))
count += 1
centre = dot(1./count, centre)
return centre
```

Featured Replies

- 2
As posted over we need more info,like input data. Code use [Numpy](http://numpy.scipy.org/) and it use function add() and dot(). To see what these numpy function dos,look into numpy doc here is [add()](http://www.scipy.org/add?highlight=%28add%29) To test function so it work i guessed for a nested list as input data. from numpy import … Read More

This topic has been dead for over six months. Start a new discussion instead.

Recommended Topics