From 14bdb5298ada6e125a081b945410adddbb1c3297 Mon Sep 17 00:00:00 2001 From: btracey Date: Mon, 10 Aug 2015 00:31:39 -0600 Subject: [PATCH] Fix Dgels to check the correct dimension --- cgo/lapack.go | 2 +- native/dgels.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cgo/lapack.go b/cgo/lapack.go index 024173e..a876aec 100644 --- a/cgo/lapack.go +++ b/cgo/lapack.go @@ -234,7 +234,7 @@ func (impl Implementation) Dgels(trans blas.Transpose, m, n, nrhs int, a []float return true } checkMatrix(m, n, a, lda) - checkMatrix(mn, nrhs, b, ldb) + checkMatrix(max(m, n), nrhs, b, ldb) if len(work) < lwork { panic(shortWork) } diff --git a/native/dgels.go b/native/dgels.go index 47bfa68..a06c7ed 100644 --- a/native/dgels.go +++ b/native/dgels.go @@ -42,7 +42,7 @@ func (impl Implementation) Dgels(trans blas.Transpose, m, n, nrhs int, a []float notran := trans == blas.NoTrans checkMatrix(m, n, a, lda) mn := min(m, n) - checkMatrix(mn, nrhs, b, ldb) + checkMatrix(max(m, n), nrhs, b, ldb) // Find optimal block size. tpsd := true