Skip to content

Commit d9468da

Browse files
committed
Fix eig tests for column-major arrays
1 parent 082f01d commit d9468da

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

ndarray-linalg/tests/eig.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ fn test_matrix_real<T: Scalar>() -> Array2<T::Real> {
8787
}
8888

8989
fn test_matrix_real_t<T: Scalar>() -> Array2<T::Real> {
90-
test_matrix_real::<T>().t().permuted_axes([1, 0]).to_owned()
90+
let orig = test_matrix_real::<T>();
91+
let mut out = Array2::zeros(orig.raw_dim().f());
92+
out.assign(&orig);
93+
out
9194
}
9295

9396
fn answer_eig_real<T: Scalar>() -> Array1<T::Complex> {
@@ -154,10 +157,10 @@ fn test_matrix_complex<T: Scalar>() -> Array2<T::Complex> {
154157
}
155158

156159
fn test_matrix_complex_t<T: Scalar>() -> Array2<T::Complex> {
157-
test_matrix_complex::<T>()
158-
.t()
159-
.permuted_axes([1, 0])
160-
.to_owned()
160+
let orig = test_matrix_complex::<T>();
161+
let mut out = Array2::zeros(orig.raw_dim().f());
162+
out.assign(&orig);
163+
out
161164
}
162165

163166
fn answer_eig_complex<T: Scalar>() -> Array1<T::Complex> {

0 commit comments

Comments
 (0)