Update the coordinate array r_array
499908
def update_positions(self, r_array):
        ''''''
        self.ar.update_positions(r_array)
        
        if self.has_bonds:
            self.br.update_positions(r_array)
1310235
public void updateDistanceMatrix() {

		// Reset the distance Matrix variable
		distanceMatrix = new ArrayList<Matrix>();

		for (int s = 0; s < size(); s++) {
			Atom[] ca = atomArrays.get(s);
			Matrix distMat = AlignUtils.getDistanceMatrix(ca, ca);
			distanceMatrix.add(distMat);
		}
	}
214794
private void updateBounds()
    {
        if (npoints >= MIN_POINTS)
        {
            double boundsMinX = Double.MAX_VALUE;
            double boundsMinY = Double.MAX_VALUE;
            double boundsMaxX = -Double.MAX_VALUE;
            double boundsMaxY = -Double.MAX_VALUE;

            for (int i = 0; i < npoints; i++)
            {
                final double x = xpoints[i];
                boundsMinX = Math.min(boundsMinX, x);
                boundsMaxX = Math.max(boundsMaxX, x);

                final double y = ypoints[i];
                boundsMinY = Math.min(boundsMinY, y);
                boundsMaxY = Math.max(boundsMaxY, y);
            }

            bounds.set(boundsMinX, boundsMinY, boundsMaxX - boundsMinX, boundsMaxY - boundsMinY);
        }
    }
315504
def _coordinates_changed(self):
        """"""
        if self._are_coordinates_valid():
            point1 = QgsPointXY(
                self.x_minimum.value(),
                self.y_maximum.value())
            point2 = QgsPointXY(
                self.x_maximum.value(),
                self.y_minimum.value())
            rect = QgsRectangle(point1, point2)

            self.tool.set_rectangle(rect)
789098
def update_bounds(self, bounds):
        '''

        '''
        starts =  bounds[:,0,:]
        ends = bounds[:,1,:]

        self.bounds = bounds
        self.lengths =  np.sqrt(((ends - starts)**2).sum(axis=1))
        
        vertices, normals, colors = self._process_reference()
        
        self.tr.update_vertices(vertices)
        self.tr.update_normals(normals)
1206551
public void setMatrix(int[] r, int[] c, Matrix X)
    {
        try
        {
            for (int i = 0; i < r.length; i++)
            {
                for (int j = 0; j < c.length; j++)
                {
                    A[r[i]][c[j]] = X.get(i, j);
                }
            }
        }
        catch (ArrayIndexOutOfBoundsException e)
        {
            throw new ArrayIndexOutOfBoundsException("Submatrix indices");
        }
    }
886020
private void updateRemoveR() {
        for( int i = 1; i < n+1; i++ ) {
            for( int j = 0; j < n; j++ ) {
                double sum = 0;
                for( int k = i-1; k <= j; k++ ) {
                    sum += U_tran.data[i*m+k] * R.data[k*n+j];
                }
                R.data[(i-1)*n+j] = sum;
            }
        }
    }
416713
def set indexes, val
      cast(dtype: :array) if val.nil? && dtype != :array
      guard_type_check(val)

      if @index.valid?(*indexes)
        modify_vector(indexes, val)
      else
        insert_vector(indexes, val)
      end

      update_position_cache
    end
1233975
def updateRasterBounds(self):
        """"""
        yrange = self.viewRange()[1]
        yrange_size = yrange[1] - yrange[0]
        rmax = self.rasterTop*yrange_size + yrange[0]
        rmin = self.rasterBottom*yrange_size + yrange[0]
        self.rasterYslots = np.linspace(rmin, rmax, self.nreps)
        self.rasterBoundsUpdated.emit((self.rasterBottom, self.rasterTop), self.getTitle())
1202144
public static void iterate(INDArray arr, INDArray arr2, CoordinateFunction coordinateFunction) {
        Shape.iterate(0, arr.rank(), arr.shape(), new long[arr.rank()], 0, arr2.rank(), arr2.shape(),
                new long[arr2.rank()], coordinateFunction);
    }
738390
protected void updateA( int w )
    {
        final double u[] = dataQR[w];

        for( int j = w+1; j < numCols; j++ ) {

            final double colQ[] = dataQR[j];
            double val = colQ[w];

            for( int k = w+1; k < numRows; k++ ) {
                val += u[k]*colQ[k];
            }
            val *= gamma;

            colQ[w] -= val;
            for( int i = w+1; i < numRows; i++ ) {
                colQ[i] -= u[i]*val;
            }
        }
    }
1302048
def set_data_matrix(self, X):
        
        X = check_array(X, accept_sparse=sparse_formats)
        self.X = X
1259465
def rd2xy(input,ra=None,dec=None,coordfile=None,colnames=None,
            precision=6,output=None,verbose=True):
    
    single_coord = False
    if coordfile is not None:
        if colnames in blank_list:
            colnames = ['c1','c2']
        elif isinstance(colnames,type('a')):
            colnames = colnames.split(',')
        # convert input file coordinates to lists of decimal degrees values
        xlist,ylist = tweakutils.readcols(coordfile,cols=colnames)
    else:
        if isinstance(ra,np.ndarray):
            ralist = ra.tolist()
            declist = dec.tolist()
        elif not isinstance(ra, list):
            ralist = [ra]
            declist = [dec]
        else:
            ralist = ra
            declist = dec
        xlist  = [0]*len(ralist)
        ylist = [0]*len(ralist)
        if len(xlist) == 1:
            single_coord = True
        for i,(r,d) in enumerate(zip(ralist,declist)):
            # convert input value into decimal degrees value
            xval,yval = tweakutils.parse_skypos(r,d)
            xlist[i] = xval
            ylist[i] = yval

    # start by reading in WCS+distortion info for input image
    inwcs = wcsutil.HSTWCS(input)
    if inwcs.wcs.is_unity():
        print("####\nNo valid WCS found in {}.\n  Results may be invalid.\n####\n".format(input))

    # Now, convert pixel coordinates into sky coordinates
    try:
        outx,outy = inwcs.all_world2pix(xlist,ylist,1)
    except RuntimeError:
        outx,outy = inwcs.wcs_world2pix(xlist,ylist,1)

    # add formatting based on precision here...
    xstr = []
    ystr = []
    fmt = "%."+repr(precision)+"f"
    for x,y in zip(outx,outy):
        xstr.append(fmt%x)
        ystr.append(fmt%y)

    if verbose or (not verbose and util.is_blank(output)):
        print ('# Coordinate transformations for ',input)
        print('# X      Y         RA             Dec\n')
        for x,y,r,d in zip(xstr,ystr,xlist,ylist):
            print("%s  %s    %s  %s"%(x,y,r,d))

    # Create output file, if specified
    if output:
        f = open(output,mode='w')
        f.write("# Coordinates converted from %s\n"%input)
        for x,y in zip(xstr,ystr):
            f.write('%s    %s\n'%(x,y))
        f.close()
        print('Wrote out results to: ',output)

    if single_coord:
        outx = outx[0]
        outy = outy[0]

    return outx, outy
323288
def update_bounds(self, bounds):
        ''''''
        self.bounds = np.array(bounds, dtype='float32')
        vertices, directions = self._gen_bounds(self.bounds) 
        
        self._verts_vbo.set_data(vertices)
        self._directions_vbo.set_data(directions)
        self.widget.update()
1199533
def set_y(idx, val)
      check_bounds(idx)
      FFIGeos.GEOSCoordSeq_setY_r(Geos.current_handle_pointer, ptr, idx, val.to_f)
    end
756592
protected void updateA( int w )
    {
        final double u[] = dataQR[w];

        for( int j = w+1; j < numCols; j++ ) {

            final double colQ[] = dataQR[j];
            // first element in u is assumed to be 1.0 + 0*i
            double realSum = colQ[w*2];
            double imagSum = colQ[w*2+1];

            for( int k = w+1; k < numRows; k++ ) {
                double realU = u[k*2];
                double imagU = -u[k*2+1];

                double realQ = colQ[k*2];
                double imagQ = colQ[k*2+1];

                realSum += realU*realQ - imagU*imagQ;
                imagSum += imagU*realQ + realU*imagQ;
            }
            realSum *= gamma;
            imagSum *= gamma;

            colQ[w*2  ] -= realSum;
            colQ[w*2+1] -= imagSum;

            for( int i = w+1; i < numRows; i++ ) {
                double realU = u[i*2];
                double imagU = u[i*2+1];

                colQ[i*2]  -= realU*realSum - imagU*imagSum;
                colQ[i*2+1]-= imagU*realSum + realU*imagSum;
            }
        }
    }
1370452
public void updateAxis(Integer index, Matrix4d newAxis){
		axes.get(index).setOperator(newAxis);
	}