original_docstring: 
  
          Function that creates the Supra-adjacency matrix for this multiplex
          In this part we use sparse matrix to optimize time complexity and memory.
  
          
docstring: Function that creates the Supra-adjacency matrix for this multiplex
  In this part we use sparse matrix to optimize time complexity and memory.
docstring_tokens: Function that creates the Supra - adjacency matrix for this multiplex In this part we use sparse matrix to optimize time complexity and memory .
code: def supra_adj_matrixcoo(self):
          """
  
          Function that creates the Supra-adjacency matrix for this multiplex
          In this part we use sparse matrix to optimize time complexity and memory.
  
          """
  
          if self._supra_adj_matrixcoo is None:
  
              node_count = len(self.nodes)
              # Layers = self.Layers_new[
              #          sum(self.layer_count): self.layer_count + sum(
              #              self.layer_count)]
              # Id = scipy.sparse.csr_matrix(scipy.sparse.identity(self.N[k]))
              Id = scipy.sparse.csr_matrix(scipy.sparse.identity(node_count))
              # L = int(self.multiplex_layer_count_2dlist[k])
              L = len(self.layer_tuple)  # nb of layers
              mask = numpy.zeros((L, L))
              pieces = list()
              # nodes_name = self.multiplexall_node_2dlist[k]
              # nodes_name = self.nodes  # node list
              compt = 0
              if (L != 1):
                  # for i in range(self.multiplex_layer_count_2dlist[k]):
                  for i, layer_obj in enumerate(self.layer_tuple):
                      # Adjacency_layer = networkx.to_scipy_sparse_matrix(Layers[i], nodelist=nodes_name, format="coo")
                      self._supra_adj_matrixcoo = networkx.to_scipy_sparse_matrix(layer_obj.networkx, nodelist=self.nodes, format="coo")
                      mask[i, i] = compt
                      compt += 1
                      pieces.append((1 - self.delta) * self._supra_adj_matrixcoo)
                      for j in range((i + 1), L):
                          mask[j, i] = compt
                          compt += 1
                          pieces.append((self.delta / (L - 1)) * Id)
                          mask[i, j] = compt
                          compt += 1
                          pieces.append((self.delta / (L - 1)) * Id)
                  temp = numpy.zeros((L, L), dtype=object)
                  for i in range(L):
                      for j in range(L):
                          temp[i, j] = pieces[int(mask[i, j])]
                  # self.SupraAdjacencyMatrix.append(
                  #     scipy.sparse.bmat(temp, format="coo"))
                  self._supra_adj_matrixcoo = scipy.sparse.bmat(temp, format="coo")
              else:
                  layer_obj = self.layer_tuple[0]
                  self._supra_adj_matrixcoo = networkx.to_scipy_sparse_matrix(layer_obj.networkx,
                                                                              nodelist=self.nodes,
                                                                              format="coo")
          return self._supra_adj_matrixcoo
code_tokens: def supra_adj_matrixcoo ( self ) : if self . _supra_adj_matrixcoo is None : node_count = len ( self . nodes ) Id = scipy . sparse . csr_matrix ( scipy . sparse . identity ( node_count ) ) L = len ( self . layer_tuple ) mask = numpy . zeros ( ( L , L ) ) pieces = list ( ) compt = 0 if ( L != 1 ) : for i , layer_obj in enumerate ( self . layer_tuple ) : self . _supra_adj_matrixcoo = networkx . to_scipy_sparse_matrix ( layer_obj . networkx , nodelist = self . nodes , format = "coo" ) mask [ i , i ] = compt compt += 1 pieces . append ( ( 1 - self . delta ) * self . _supra_adj_matrixcoo ) for j in range ( ( i + 1 ) , L ) : mask [ j , i ] = compt compt += 1 pieces . append ( ( self . delta / ( L - 1 ) ) * Id ) mask [ i , j ] = compt compt += 1 pieces . append ( ( self . delta / ( L - 1 ) ) * Id ) temp = numpy . zeros ( ( L , L ) , dtype = object ) for i in range ( L ) : for j in range ( L ) : temp [ i , j ] = pieces [ int ( mask [ i , j ] ) ] self . _supra_adj_matrixcoo = scipy . sparse . bmat ( temp , format = "coo" ) else : layer_obj = self . layer_tuple [ 0 ] self . _supra_adj_matrixcoo = networkx . to_scipy_sparse_matrix ( layer_obj . networkx , nodelist = self . nodes , format = "coo" ) return self . _supra_adj_matrixcoo
short_docstring: Function that creates the Supra-adjacency matrix for this multiplex
  In this part we use sparse matrix to optimize time complexity and memory.
short_docstring_tokens: Function that creates the Supra - adjacency matrix for this multiplex In this part we use sparse matrix to optimize time complexity and memory .
comment: """
  
          Function that creates the Supra-adjacency matrix for this multiplex
          In this part we use sparse matrix to optimize time complexity and memory.
  
          """$SEP$# Layers = self.Layers_new[$SEP$#          sum(self.layer_count): self.layer_count + sum($SEP$#              self.layer_count)]$SEP$# Id = scipy.sparse.csr_matrix(scipy.sparse.identity(self.N[k]))$SEP$# L = int(self.multiplex_layer_count_2dlist[k])$SEP$# nb of layers$SEP$# nodes_name = self.multiplexall_node_2dlist[k]$SEP$# nodes_name = self.nodes  # node list$SEP$# for i in range(self.multiplex_layer_count_2dlist[k]):$SEP$# Adjacency_layer = networkx.to_scipy_sparse_matrix(Layers[i], nodelist=nodes_name, format="coo")$SEP$# self.SupraAdjacencyMatrix.append($SEP$#     scipy.sparse.bmat(temp, format="coo"))