# Lovasz number

I found this link:

http://sage.math.washington.edu/tmp/s...

It talks about a graph database. My question isn't really about this database, but the fact that this database has the Lovasz number makes me wonder if Sage can calculate the Lovasz number of a graph???

Thanks

**BUMP:** Did any one get the code (in the answer below) to work? It calls an error when I run it. And, I have no idea what the code is doing so I can't really figure out the error :)

```
File "/tmp/tmp0_qsPp/___code___.py", line 21, in lovasz_theta
c = -cvxopt.base.matrix([_sage_const_0p0 ]*(n-_sage_const_1 ) + [_sage_const_2p0 ]*(d-n))
TypeError: invalid type in list
```

It's conceivable that that is pure Python code?

@kcrisman Sorry, I don't know much. What would that tell us? :)

Try it with "python" selected in the notebook, not "sage". The problem is that cvxopt only takes very basic Python types for its lists, I guess. So when "Sage" types like `RealNumber`s come into play, cvxopt breaks. Using the program below with Sage tries to turn floats like `0.0` into "real numbers" like in Sage.

Note: the link in the question is no longer working, the current location for the corresponding page is:

http://doc.sagemath.org/html/en/reference/graphs/sage/graphs/graph_database.html .