Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linfa-clustering won't compile due to type error #126

Closed
quietlychris opened this issue Apr 26, 2021 · 2 comments
Closed

linfa-clustering won't compile due to type error #126

quietlychris opened this issue Apr 26, 2021 · 2 comments

Comments

@quietlychris
Copy link
Member

I came across an issue compiling linfa-clustering as a dependency for the Rust-ML book today, which per the error message is tracked down to a link the linfa-clustering/src/gaussian_mixture/algorithm.rs in the compute_precisions_cholesky_full() function, which using the Cholesky method imported in from ndarray-linalg. As far as I can tell, when cloning linfa's master and trying to build in the sub-crate, I run into the same compilation error. I've tinkered around with it, but haven't figured out a fix quite yet.

Compiling linfa-clustering v0.3.1 (https://github.com/rust-ml/linfa?branch=master#b7c31c58)
error[E0599]: no method named `cholesky` found for struct `ArrayBase<ViewRepr<&<F as linfa::Float>::Lapack>, Dim<[usize; 2]>>` in the current scope
   --> /home/chrism/.cargo/git/checkouts/linfa-f557574ebcb8312b/b7c31c5/algorithms/linfa-clustering/src/gaussian_mixture/algorithm.rs:262:51
    |
262 |             let decomp = covariance.with_lapack().cholesky(UPLO::Lower)?;
    |                                                   ^^^^^^^^ method not found in `ArrayBase<ViewRepr<&<F as linfa::Float>::Lapack>, Dim<[usize; 2]>>`

error: aborting due to previous error
@bytesnake
Copy link
Member

This was introduced in #121 and happens when you do not specify a LAPACK backend for compilation. I pushed a fix in 6866450

@quietlychris
Copy link
Member Author

Sounds great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants