From b4984a8529af4065bf55a6a1771e6eacf8f45c08 Mon Sep 17 00:00:00 2001
From: Joseph Weston <joseph.weston08@gmail.com>
Date: Thu, 22 Jun 2017 15:04:49 +0200
Subject: [PATCH] add fused type definitions

---
 kwant/linalg/lapack.pyx | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/kwant/linalg/lapack.pyx b/kwant/linalg/lapack.pyx
index 54a9f6de..f163360e 100644
--- a/kwant/linalg/lapack.pyx
+++ b/kwant/linalg/lapack.pyx
@@ -31,6 +31,31 @@ ctypedef bint l_logical
 int_dtype = np.int32
 logical_dtype = np.int32
 
+ctypedef float complex float_complex
+ctypedef double complex double_complex
+
+ctypedef fused scalar:
+    float
+    double
+    float complex
+    double complex
+
+ctypedef fused single_precision:
+    float
+    float complex
+
+ctypedef fused double_precision:
+    double
+    double complex
+
+ctypedef fused cmplx:
+    float complex
+    double complex
+
+ctypedef fused floating:
+    float
+    double
+
 # exceptions
 
 class LinAlgError(RuntimeError):
-- 
GitLab