Skip to content

Commit 7051631

Browse files
committed
Force layout to be Fortran
1 parent ad171af commit 7051631

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/eigh.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ where
6363
type EigVal = Array1<A::Real>;
6464

6565
fn eigh_inplace(&mut self, uplo: UPLO) -> Result<(Self::EigVal, &mut Self)> {
66+
dbg!(&self);
67+
let layout = self.square_layout()?;
68+
// XXX Force layout to be Fortran (see #146)
69+
match layout {
70+
MatrixLayout::C(_) => self.swap_axes(0, 1),
71+
MatrixLayout::F(_) => {}
72+
}
6673
let s = unsafe { A::eigh(true, self.square_layout()?, uplo, self.as_allocated_mut()?)? };
6774
Ok((ArrayBase::from_vec(s), self))
6875
}

0 commit comments

Comments
 (0)