From eabe408293a59e71e1d22ed68e8030de8cef5612 Mon Sep 17 00:00:00 2001 From: Vladimir Chalupecky Date: Tue, 15 Aug 2017 11:53:04 +0200 Subject: [PATCH] blas/gonum: test that imaginary part of diagonal is ignored in Zher --- blas/testblas/zher.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blas/testblas/zher.go b/blas/testblas/zher.go index b89b50d1b..fbd14b659 100644 --- a/blas/testblas/zher.go +++ b/blas/testblas/zher.go @@ -5,6 +5,7 @@ package testblas import ( + "math" "math/cmplx" "testing" @@ -127,6 +128,7 @@ func ZherTest(t *testing.T, impl Zherer) { a[i*lda+j] = cmplx.NaN() want[i*lda+j] = cmplx.NaN() } + a[i*lda+i] = complex(real(a[i*lda+i]), math.NaN()) } } else { for i := 0; i < n; i++ { @@ -134,6 +136,7 @@ func ZherTest(t *testing.T, impl Zherer) { a[i*lda+j] = cmplx.NaN() want[i*lda+j] = cmplx.NaN() } + a[i*lda+i] = complex(real(a[i*lda+i]), math.NaN()) } }