Skip to content

Commit

Permalink
Bump rust-version to 1.65
Browse files Browse the repository at this point in the history
Required by the new version of the `regex` crate.
  • Loading branch information
msk committed May 20, 2024
1 parent 1894ae4 commit 1e764cf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
rust: [stable, 1.64]
rust: [stable, 1.65]

steps:
- name: Install Rust
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ keywords = ["matrix", "decomposition", "pca", "ica", "dimensionality"]
categories = ["mathematics", "science", "algorithms"]
authors = ["Min Kim <[email protected]>"]
edition = "2021"
rust-version = "1.65"
exclude = ["./github"]

[badges]
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ petal-decomposition provides matrix decomposition algorithms including PCA

## Requirements

* Rust ≥ 1.63
* BLAS/LAPACK backend (OpenBLAS, Netlib, or Intel MKL)

## Features
Expand Down
5 changes: 1 addition & 4 deletions src/ica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,14 @@ where
/// incompatible with LAPACK.
/// * [`DecompositionError::LinalgError`] if the underlying Singular Vector
/// Decomposition routine fails.
#[allow(clippy::manual_let_else)] // requires rust-version>=1.65
fn inner_fit<S>(&mut self, input: &ArrayBase<S, Ix2>) -> Result<Array2<A>, linalg::Error>
where
A: Lapack,
A::Real: Float,
S: Data<Elem = A>,
{
let n_components = cmp::min(input.nrows(), input.ncols());
let means = if let Some(means) = input.mean_axis(Axis(0)) {
means
} else {
let Some(means) = input.mean_axis(Axis(0)) else {
return Ok(Array2::<A>::zeros((0, input.ncols())));
};
let n_features = input.nrows();
Expand Down

0 comments on commit 1e764cf

Please sign in to comment.