return the KL projection on the row constrints
15179
def projR(gamma, p):
    
    return np.multiply(gamma.T, p / np.maximum(np.sum(gamma, axis=1), 1e-10)).T
195075
function(U) {
            	var k = this.cols();
            	var Ureduce = U.slice(1, U.rows(), 1, k);
            	return this.x(Ureduce.transpose());
                }
1176573
def _vector(x, type='row'):
    """"""
    if isinstance(x, (list, tuple)):
        x = np.array(x, dtype=np.float32)
    elif not isinstance(x, np.ndarray):
        x = np.array([x], dtype=np.float32)
    assert x.ndim == 1
    if type == 'column':
        x = x[:, None]
    return x
224584
function row (root, prefix, isTail, out, printNode) {
  if (root) {
    out(`${ prefix }${ isTail ? '└── ' : '├── ' }${ printNode(root) }\n`);
    const indent = prefix + (isTail ? '    ' : '│   ');
    if (root.left)  row(root.left,  indent, false, out, printNode);
    if (root.right) row(root.right, indent, true,  out, printNode);
  }
}
120278
def pprint_cell(self, row, col):
        
        ndims = self.ndims
        if col >= self.cols:
            raise Exception("Maximum column index is %d" % self.cols-1)
        elif row >= self.rows:
            raise Exception("Maximum row index is %d" % self.rows-1)
        elif row == 0:
            if col >= ndims:
                if self.vdims:
                    return self.vdims[col - ndims].pprint_label
                else:
                    return ''
            return self.kdims[col].pprint_label
        else:
            dim = self.get_dimension(col)
            return dim.pprint_value(self.iloc[row-1, col])
720540
def get_row(row)
      row = @row_keys[row]
      row.nil? ? nil : @col_keys.map { |c, ci| [c, @content[row][ci]] }.to_h
    end
58151
int getIndex(int row, int column) {
        check(row, column);
        return ku + row - column + column * (kl + ku + 1);
    }
1084556
def asRow(self):
        
        fields = self.fields
        row = [""] * len(fields)
        for k,v in self._attributes.items():
            row[fields.index(k)] = v
            del v
            del k
        if self.geometry is not None:
            row.append(self.geometry)
            fields.append("SHAPE@")
        return row, fields
40028
function(col, row) {
            var r = this.map[row],
                corrIdx = -1;
            for (var i = 0, max = col; i < col; i++) {
                if (r[i].isReal){
                    corrIdx++;
                }
            }
            return corrIdx;
        }
1132066
def build_projection_kwargs(cls, source, mapping):
        """"""
        return cls._map_arg_names(source, cls._default_attr_mapping + mapping)
968974
def _K(self, R):
        """"""
        return self._ns * self._N / R / self._sin_alpha
291094
def row(self):
        """"""
        if self.parent is not None:
            children = self.parent.getChildren()
            # The index method of the list object.
            return children.index(self)
        else:
            return 0
896001
def getColRowWithinChannel(self, ra, dec, ch, wantZeroOffset=False,
                               allowIllegalReturnValues=True):
        
        # How close is a given ra/dec to the origin of a KeplerModule?
        x, y = self.defaultMap.skyToPix(ra, dec)
        kepModule = self.getChannelAsPolygon(ch)
        r = np.array([x[0],y[0]]) - kepModule.polygon[0, :]

        v1 = kepModule.polygon[1, :] - kepModule.polygon[0, :]
        v3 = kepModule.polygon[3, :] - kepModule.polygon[0, :]

        # Divide by |v|^2 because you're normalising v and r
        colFrac = np.dot(r, v1) / np.linalg.norm(v1)**2
        rowFrac = np.dot(r, v3) / np.linalg.norm(v3)**2

        # This is where it gets a little hairy. The channel "corners"
        # supplied to me actually represent points 5x5 pixels inside
        # the science array. Which isn't what you'd expect.
        # These magic numbers are the pixel numbers of the corner
        # edges given in fov.txt
        col = colFrac*(1106-17) + 17
        row = rowFrac*(1038-25) + 25

        if not allowIllegalReturnValues:
            if not self.colRowIsOnSciencePixel(col, row):
                msg = "Request position %7f %.7f " % (ra, dec)
                msg += "does not lie on science pixels for channel %i " % (ch)
                msg += "[ %.1f %.1f]" % (col, row)
                raise ValueError(msg)

        # Convert from zero-offset to one-offset coords
        if not wantZeroOffset:
            col += 1
            row += 1

        return (col, row)
364825
def build_row!(row)
      row = @row_klass.call(row)

      # Convert values
      @type_map.each do |column, type|
        row[column] = @converter.call(row[column], type)
      end

      return row unless @builder

      @builder.call(row)
    end
163316
def Ak(self, k, m_pred, P_pred):  # returns state iteration matrix
        

        return self.A[:, :, self.index[self.A_time_var_index, k]]
963767
def rowcol(x, y, affine, op=math.floor):
    
    r = int(op((y - affine.f) / affine.e))
    c = int(op((x - affine.c) / affine.a))
    return r, c
709128
def row_coordinates(self, X):
        
        utils.validation.check_is_fitted(self, 's_')

        # Extract index
        index = X.index if isinstance(X, pd.DataFrame) else None

        # Copy data
        if self.copy:
            X = np.copy(X)

        # Scale data
        if hasattr(self, 'scaler_'):
            X = self.scaler_.transform(X)

        return pd.DataFrame(data=X.dot(self.V_.T), index=index)