def get_edges_all(self):
    E = self.nEdgeTotal
    N = self.nNodeTotal
    edges = np.zeros( (E,3) )
    e = 0
    for ii in xrange(N):
        for jj in xrange(ii+1,N):
            edges[e,:] = [ii,jj,self.sparseY[ii,jj]]
            e += 1
    np.asarray(np.squeeze(edges), dtype=np.int8)
    self.indTrain = np.asarray(np.squeeze(np.nonzero(edges[:,2] >= 0)))
    self.edges = edges[self.indTrain,:]
    self.ind0 = np.asarray(np.squeeze(np.nonzero(self.edges[:,2]==0)))
    self.ind1 = np.asarray(np.squeeze(np.nonzero(self.edges[:,2]==1)))
    self.nEdgeTotal = len(self.edges)
    self.nObs = self.nEdgeTotal # for VBLearnAlg.py
    print "Total number of training edges: " + str(self.nEdgeTotal) + "/" + str(E)
    print "Total number of zero/ones within training: " + "(" + str(len(self.ind0)) + "/" + str(len(self.ind1)) + ")"

    return (self.edges, self.ind0, self.ind1, self.indTrain)

  ######################################################### Create from MAT
  #########################################################  (class method)
Typically expensive, but for small graphs we can get an edge list for all pairwise edges
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/data/GraphData.py/GraphData.get_edges_all