Returns the average point in the cloud.

        Returns
        -------
        :obj:`Point`
            The mean point in the PointCloud.
960571
def mean(self):
        
        mean_point_data = np.mean(self._data, axis=1)
        return Point(mean_point_data, self._frame)
234428
def scale(self):
        
        # use vertices peak-peak rather than exact extents
        scale = float((self.vertices.ptp(axis=0) ** 2).sum() ** .5)
        return scale
549469
def mean(self):
        
        return self._constructor(self.values.mean(axis=self.baseaxes, keepdims=True))
457397
def moving_average(self, window, method=SIMPLE):
        ''''''
        if len(self.points) < window:
            raise ArithmeticError('Not enough points for moving average')
        numpy = LazyImport.numpy()
        if method == TimeSeries.SIMPLE:
            weights = numpy.ones(window) / float(window)
        ma_x = self.timestamps[window-1:]
        ma_y = numpy.convolve(self.values, weights)[window-1:-(window-1)].tolist()
        return TimeSeries(zip(ma_x, ma_y))
763647
def get_average_record(self, n):
        
        history_deque = collections.deque()
        averages = []
        for d in self.data_points:
            history_deque.appendleft(d)
            if len(history_deque) > n:
                history_deque.pop()
            avg = sum(history_deque) / len(history_deque)
            averages.append(round(avg, self.lr))
        return averages
314302
def _calculate_average(self, points):
        
        assert len(self.theta) == len(points), \
            "points has length %i, but should have length %i" % \
            (len(points), len(self.theta))
        new_point = {'x': 0, 'y': 0, 'time': 0}
        for key in new_point:
            new_point[key] = self.theta[0] * points[0][key] + \
                self.theta[1] * points[1][key] + \
                self.theta[2] * points[2][key]
        return new_point
350339
def example_point(self):
        
        if not np.isinf(self.min):
            return np.array([self.min], dtype=self.dtype)
        if not np.isinf(self.max):
            return np.array([self.max], dtype=self.dtype)
        else:
            return np.array([0], dtype=self.dtype)
1193872
def dist(self, point):
        
        r = range(self.dimensions)
        return sum([self.axis_dist(point, i) for i in r])
152547
def centroid(self):
        '''
        

        '''
        if self.v is None:
            raise ValueError('Mesh has no vertices; centroid is not defined')

        return np.mean(self.v, axis=0)
282451
function() {
			// Get the x and y coordinates
			var xCoords = this.pluck('x');
			var yCoords = this.pluck('y');

			// Get the means for the x and y coordinates
			var meanX = xCoords.mean();
			var meanY = yCoords.mean();

			// Get the standard deviations for the x and y coordinates
			var stdDevX = xCoords.stdDev();
			var stdDevY = yCoords.stdDev();

			// Map each element to the difference of the element and the mean
			// divided by the standard deviation
			xCoords.map(function(num) {
				return (num - meanX) / stdDevX;
			});
			yCoords.map(function(num) {
				return (num - meanY) / stdDevY;
			});

			// Multiply each element in the x by the corresponding value in
			// the y
			var nums = this.clone().map(function(num, index) {
				return xCoords.get(index) * yCoords.get(index);
			});

			// r is the sum of xCoords over the number of points minus 1
			return nums.sum() / (nums.size() - 1);
		}
930370
def get_normalized(self):
        """"""
        magnitude = self.get_magnitude()
        if magnitude > 0:
            magnitude = 1.0 / magnitude
            return Point(self.x * magnitude, self.y * magnitude)
        else:
            return self
512135
def average(self, default=None):
        
        return numpy.asscalar(numpy.average(self.values)) if self.values else default
665545
def D(self):
        '''
        
        '''
        return Point(self.minX, self.maxY, self.origin.z)
201699
def points(self):
        
        feature = geojson.Feature(geometry=self._geom)
        points_coords = list(geojson.utils.coords(feature))
        return [Point(p[0], p[1]) for p in points_coords]
594884
def get_mean(self, grp=None):
        
        self.init()
        if len(self.weights) == 1:  # one realization
            # the standard deviation is zero
            pmap = self.get(0, grp)
            for sid, pcurve in pmap.items():
                array = numpy.zeros(pcurve.array.shape[:-1] + (2,))
                array[:, 0] = pcurve.array[:, 0]
                pcurve.array = array
            return pmap
        else:  # multiple realizations
            dic = ({g: self.dstore['poes/' + g] for g in self.dstore['poes']}
                   if grp is None else {grp: self.dstore['poes/' + grp]})
            pmaps = self.rlzs_assoc.combine_pmaps(dic)
            return stats.compute_pmap_stats(
                pmaps, [stats.mean_curve, stats.std_curve],
                self.weights, self.imtls)
909706
def get_point(cls, idx, size):
        
        x, y = cls.POSITION[idx % 4]
        idx //= 4
        block_size = 2
        while block_size < size:
            block_idx = idx % 4
            x, y = cls.get_point_in_block(x, y, block_idx, block_size)
            idx //= 4
            block_size *= 2
        return x, y
108707
def calculate_average_diameter(self, **kwargs):
        
        self.average_diameter = find_average_diameter(
            self.elements, self.coordinates, **kwargs)
        return self.average_diameter