MVar.tolist()


MVar.tolist()

tolist ( )

Return the variables associated with this matrix variable as a list of individual Var objects.

Return value:

List of Var objects.

Example usage:

  mvar = model.addMVar(5)
  varlist = mvar.tolist()
  # Do something with the Var correponding to mvar[3]
  print(varlist[3])