diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c651a39..5200dcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,14 +20,16 @@ jobs: - stable - beta - nightly - - 1.49.0 # MSRV + - 1.64.0 # MSRV steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - override: true + - name: Pin versions for MSRV + if: "${{ matrix.rust == '1.64.0' }}" + run: | + cargo update -p regex --precise 1.8.4 - name: Build run: cargo build --verbose - name: Run tests @@ -40,21 +42,16 @@ jobs: include: # 64-bit, big-endian - rust: stable - target: mips64-unknown-linux-gnuabi64 - # 32-bit, big-endian - - rust: stable - target: mips-unknown-linux-gnu + target: s390x-unknown-linux-gnu # 32-bit, little-endian - rust: stable target: i686-unknown-linux-gnu steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} target: ${{ matrix.target }} - override: true - name: Install cross run: cargo install cross -f - name: Build @@ -86,12 +83,10 @@ jobs: rust: - nightly steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - override: true - name: Install tarpaulin run: cargo install cargo-tarpaulin -f - name: Generate code coverage diff --git a/Cargo.toml b/Cargo.toml index 892533e..6fb36e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ keywords = ["array", "multidimensional", "statistics", "matrix", "ndarray"] categories = ["data-structures", "science"] [dependencies] -ndarray = "0.15.0" +ndarray = "0.16.0" noisy_float = "0.2.0" num-integer = "0.1" num-traits = "0.2" @@ -25,11 +25,11 @@ itertools = { version = "0.10.0", default-features = false } indexmap = "1.6.2" [dev-dependencies] -ndarray = { version = "0.15.0", features = ["approx"] } +ndarray = { version = "0.16.1", features = ["approx"] } criterion = "0.3" quickcheck = { version = "0.9.2", default-features = false } -ndarray-rand = "0.14.0" -approx = "0.4" +ndarray-rand = "0.15.0" +approx = "0.5" quickcheck_macros = "1.0.0" num-bigint = "0.4.0" diff --git a/tests/summary_statistics.rs b/tests/summary_statistics.rs index 754d28e..5269e33 100644 --- a/tests/summary_statistics.rs +++ b/tests/summary_statistics.rs @@ -164,7 +164,7 @@ fn test_with_array_of_floats() { epsilon = 1e-12 ); - let data = a.into_shape((2, 5, 5)).unwrap(); + let data = a.into_shape_with_order((2, 5, 5)).unwrap(); let weights = array![0.1, 0.5, 0.25, 0.15, 0.2]; assert_abs_diff_eq!( data.weighted_mean_axis(Axis(1), &weights).unwrap(), @@ -254,7 +254,9 @@ fn mean_axis_eq_if_uniform_weights() { let depth = a.len() / 12; a.truncate(depth * 3 * 4); let weights = Array1::from_elem(depth, 1.0 / depth as f64); - let a = Array1::from(a).into_shape((depth, 3, 4)).unwrap(); + let a = Array1::from(a) + .into_shape_with_order((depth, 3, 4)) + .unwrap(); let ma = a.mean_axis(Axis(0)).unwrap(); let wm = a.weighted_mean_axis(Axis(0), &weights).unwrap(); let ws = a.weighted_sum_axis(Axis(0), &weights).unwrap(); @@ -288,7 +290,9 @@ fn weighted_var_algo_eq_simple_algo() { } let depth = a.len() / 12; a.truncate(depth * 3 * 4); - let a = Array1::from(a).into_shape((depth, 3, 4)).unwrap(); + let a = Array1::from(a) + .into_shape_with_order((depth, 3, 4)) + .unwrap(); let mut success = true; for axis in 0..3 { let axis = Axis(axis);