diff --git a/kwant/linalg/mumps.py b/kwant/linalg/mumps.py
index 79eaa949169cd01afa1ab51f45e8658440fa917a..1dde75b4b9791262aa10b2211773d9dffc0cd16e 100644
--- a/kwant/linalg/mumps.py
+++ b/kwant/linalg/mumps.py
@@ -159,7 +159,7 @@ class MUMPSContext(object):
     Solving a small system of equations.
 
     >>> import scipy.sparse as sp
-    >>> sp.coo_matrix([[1.,0],[0,2.]])
+    >>> a = sp.coo_matrix([[1.,0],[0,2.]], dtype=complex)
     >>> ctx = kwant.linalg.mumps.MUMPSContext()
     >>> ctx.factor(a)
     >>> ctx.solve([1., 1.])