From 5fee205c3f457642639db23f3882a89898441dcf Mon Sep 17 00:00:00 2001 From: droodev Date: Sat, 9 Nov 2024 17:38:03 -0600 Subject: [PATCH] Improved alteration of code depending on compiler. --- src/npy_util.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/npy_util.h b/src/npy_util.h index 41a9fd6..3744c2f 100644 --- a/src/npy_util.h +++ b/src/npy_util.h @@ -4,12 +4,12 @@ (x1) * PyArray_STRIDES(submatrix)[1]))) #define SM_shape(x0) (int) PyArray_DIM(submatrix, x0) -#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) -static const npy_complex128 complex_one = {1.0f, 0.0f}; -static const npy_complex128 complex_zero = {1.0f, 0.0f}; -#else /* !defined(_MSC_VER) || defined(__INTEL_COMPILER) */ -static const npy_complex128 complex_one = 1 + 0 * I; -static const npy_complex128 complex_zero = 0 + 0 * I; +#if defined(_MSC_VER) + static const npy_complex128 complex_one = {1.0f, 0.0f}; + static const npy_complex128 complex_zero = {1.0f, 0.0f}; +#else /* !defined(_MSC_VER) */ + static const npy_complex128 complex_one = 1 + 0 * I; + static const npy_complex128 complex_zero = 0 + 0 * I; #endif // Complex numbers