Get the centers of the triangles in the x-dimension

        Parameters
        ----------
        %(CFDecoder.get_y.parameters)s

        Returns
        -------
        %(CFDecoder.get_y.returns)s
331056
def get_x(self, var, coords=None):
        
        if coords is None:
            coords = self.ds.coords
        # first we try the super class
        ret = super(UGridDecoder, self).get_x(var, coords)
        # but if that doesn't work because we get the variable name in the
        # dimension of `var`, we use the means of the triangles
        if ret is None or ret.name in var.dims:
            bounds = self.get_cell_node_coord(var, axis='x', coords=coords)
            if bounds is not None:
                centers = bounds.mean(axis=-1)
                x = self.get_nodes(self.get_mesh(var, coords), coords)[0]
                try:
                    cls = xr.IndexVariable
                except AttributeError:  # xarray < 0.9
                    cls = xr.Coordinate
                return cls(x.name, centers, attrs=x.attrs.copy())
263592
def moments_central(self):
        

        ycentroid, xcentroid = self.cutout_centroid.value
        return _moments_central(self._filtered_data_zeroed,
                                center=(xcentroid, ycentroid), order=3)
1203130
def middle(self):
        
        return (self.min_x + self.max_x) / 2, (self.min_y + self.max_y) / 2
164092
@Override
    public Point3d get3DCenter() {
        double xOfCenter = 0;
        double yOfCenter = 0;
        double zOfCenter = 0;
        for (IAtom atom : atoms) {
            xOfCenter += atom.getPoint3d().x;
            yOfCenter += atom.getPoint3d().y;
            zOfCenter += atom.getPoint3d().z;
        }

        return new Point3d(xOfCenter / getAtomCount(), yOfCenter / getAtomCount(), zOfCenter / getAtomCount());
    }
900824
def getCenters(self):
        
        return np.arange(self.histogram.size) * self.binWidth + self.minValue
906032
def angle(self, center1_x, center1_y, center2_x, center2_y):
        
        phi_G = np.arctan2(center2_y - center1_y, center2_x - center1_x)
        return phi_G
169900
def fit(self, X, y=None):
        
        with Timer() as self.fit_time_:
            # Fit the underlying estimator
            self.estimator.fit(X, y)

            # Get the centers
            # TODO: is this how sklearn stores all centers in the model?
            C = self.cluster_centers_

            # Embed the centers in 2D space and get the cluster scores
            self.embedded_centers_ = self.transformer.fit_transform(C)
            self.scores_ = self._score_clusters(X, y)

        # Draw the clusters and fit returns self
        self.draw()
        return self
113630
def getUnionLocations(encoder, x, y, r, step=1):
  
  output = np.zeros(encoder.getWidth(), dtype=defaultDtype)
  locations = set()
  for dx in range(-r, r+1, step):
    for dy in range(-r, r+1, step):
      if dx*dx + dy*dy <= r*r:
        e = encodeLocation(encoder, x+dx, y+dy, output)
        locations = locations.union(set(e))

  return locations
500649
def cutout_centroid(self):
        

        m = self.moments
        if m[0, 0] != 0:
            ycentroid = m[1, 0] / m[0, 0]
            xcentroid = m[0, 1] / m[0, 0]
            return (ycentroid, xcentroid) * u.pix
        else:
            return (np.nan, np.nan) * u.pix
398734
def moments(I_xy_input, x, y):
    
    I_xy = copy.deepcopy(I_xy_input)
    background = np.minimum(0, np.min(I_xy))
    I_xy -= background
    x_ = np.sum(I_xy * x)
    y_ = np.sum(I_xy * y)
    r = (np.max(x) - np.min(x)) / 3.
    mask = mask_util.mask_sphere(x, y, center_x=x_, center_y=y_, r=r)
    Q_xx = np.sum(I_xy * mask * (x - x_) ** 2)
    Q_xy = np.sum(I_xy * mask * (x - x_) * (y - y_))
    Q_yy = np.sum(I_xy * mask * (y - y_) ** 2)
    return Q_xx, Q_xy, Q_yy, background / np.mean(I_xy)
1126194
def center(self):
        '''
        
        '''
        try:
            return self._center
        except AttributeError:
            pass
        self._center = Point()
        return self._center
461010
def centroid(self):
        

        ycen, xcen = self.cutout_centroid.value
        return (ycen + self._slice[0].start,
                xcen + self._slice[1].start) * u.pix
552633
def get_center(self, element):
        
        web_element = self.get_web_element(element)
        location = web_element.location
        size = web_element.size
        return {'x': location['x'] + (size['width'] / 2), 'y': location['y'] + (size['height'] / 2)}
1076833
def get_center_of_mass(self):
        
        xsum, ysum, counter = 0., 0., 0
        for stroke in self.get_pointlist():
            for point in stroke:
                xsum += point['x']
                ysum += point['y']
                counter += 1
        return (xsum / counter, ysum / counter)
1158504
function getCenter(points) {
        var center = {x: 0, y: 0};
        for (var i =0; i < points.length; ++i ) {
            center.x += points[i].x;
            center.y += points[i].y;
        }
        center.x /= points.length;
        center.y /= points.length;
        return center;
    }
1259067
def get_center(self):
        """"""

        lr_x, lr_y = self.get_vec_lr()
        tb_x, tb_y = self.get_vec_tb()

        center_x = self.x + (lr_x + tb_x) / 2.0
        center_y = self.y + (lr_y + tb_y) / 2.0

        return center_x, center_y
1281742
def get_xyz_1d(self, xcoord, x, ycoord, y, u, v):
        """"""
        xclose = xcoord.indexes[xcoord.name].get_loc(x, method='nearest')
        yclose = ycoord.indexes[ycoord.name].get_loc(y, method='nearest')
        uval = u[yclose, xclose].values
        vval = v[yclose, xclose].values
        return xcoord[xclose].values, ycoord[yclose].values, uval, vval