Skip to content
Advertisement

Tag: centroid

Get Centroid from Sequence in N-Dimensions

I am trying to get the centroid for a series in n-dimensions. This is what I have tried: But what I am trying to get is: What am I missing here? Thanks in advance. Answer Use list comprehension instead of sum function because: sum returns the sum of all elements of an iterable, so it is now returning the sum

Advertisement