From c695cbf0fadb567814c282defcfb217ed153fa12 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 24 Jun 2013 13:33:44 +0200 Subject: [PATCH] fix compilation of ArrayBase::transposeInPlace --- test/array.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/array.cpp b/test/array.cpp index e39bd6352..631a29432 100644 --- a/test/array.cpp +++ b/test/array.cpp @@ -160,8 +160,8 @@ template void array_real(const ArrayType& m) Index cols = m.cols(); ArrayType m1 = ArrayType::Random(rows, cols), - m2 = ArrayType::Random(rows, cols), - m3(rows, cols); + m2 = ArrayType::Random(rows, cols), + m3(rows, cols); Scalar s1 = internal::random(); @@ -211,6 +211,13 @@ template void array_real(const ArrayType& m) s1 += Scalar(tiny); m1 += ArrayType::Constant(rows,cols,Scalar(tiny)); VERIFY_IS_APPROX(s1/m1, s1 * m1.inverse()); + + // check inplace transpose + m3 = m1; + m3.transposeInPlace(); + VERIFY_IS_APPROX(m3,m1.transpose()); + m3.transposeInPlace(); + VERIFY_IS_APPROX(m3,m1); } template void array_complex(const ArrayType& m)