From ab249dedca74f0961499b00bde24ce35acf1316c Mon Sep 17 00:00:00 2001 From: bluss Date: Sun, 12 Apr 2020 12:26:55 +0200 Subject: [PATCH 1/4] Revert "Update BLAS dependency. (#768)" Reason for revert: breaking change, will be re-applied after minor release is out. This reverts commit fdeb35a9ebc937453db7eae8ff54ca400603e8de. --- .gitignore | 1 - Cargo.toml | 2 +- blas-tests/Cargo.toml | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ac671d8d2..1e7caa9ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ Cargo.lock target/ -.idea/ diff --git a/Cargo.toml b/Cargo.toml index 6c911e1a5..3da63d1d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ approx = { version = "0.3.2", optional = true } # Use via the `blas` crate feature! cblas-sys = { version = "0.1.4", optional = true, default-features = false } -blas-src = { version = "0.4.0", optional = true, default-features = false } +blas-src = { version = "0.2.0", optional = true, default-features = false } matrixmultiply = { version = "0.2.0" } serde = { version = "1.0", optional = true } diff --git a/blas-tests/Cargo.toml b/blas-tests/Cargo.toml index 524f8ca74..9853ac634 100644 --- a/blas-tests/Cargo.toml +++ b/blas-tests/Cargo.toml @@ -10,7 +10,7 @@ test = false [dev-dependencies] approx = "0.3.2" ndarray = { path = "../", features = ["approx", "blas"] } -blas-src = { version = "0.4.0", default-features = false, features = ["openblas"] } -openblas-src = { version = "0.7.0", default-features = false, features = ["cblas", "system"] } +blas-src = { version = "0.2.0", default-features = false, features = ["openblas"] } +openblas-src = { version = "0.6.0", default-features = false, features = ["cblas", "system"] } defmac = "0.2" num-traits = "0.2" From bc81c51b97146f477a5cf6551d27d1c6e499b054 Mon Sep 17 00:00:00 2001 From: bluss Date: Sun, 12 Apr 2020 12:44:59 +0200 Subject: [PATCH 2/4] DOC: changelog for 0.13.1 --- RELEASES.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index 5d8f51a2e..071d12464 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,47 @@ +Version 0.13.1 (2020-04) +=========================== + +New features +------------ + +- New *amazing* slicing methods `multi_slice_*` by [@jturner314] + https://github.com/rust-ndarray/ndarray/pull/717 +- New method `.cast()` for raw views by [@bluss] + https://github.com/rust-ndarray/ndarray/pull/734 +- New aliases `ArcArray1`, `ArcArray2` by [@d-dorazio] + https://github.com/rust-ndarray/ndarray/pull/741 +- New array constructor `from_shape_simple_fn` by [@bluss] + https://github.com/rust-ndarray/ndarray/pull/728 +- `Dimension::Larger` now requires `RemoveAxis` by [@TheLortex] + https://github.com/rust-ndarray/ndarray/pull/792 + + +Enhancements +------------ + +- Remove itertools as dependency by [@bluss] + https://github.com/rust-ndarray/ndarray/pull/730 +- Improve `zip_mut_with` (and thus arithmetic ops) for f-order arrays by [@nilgoyette] + https://github.com/rust-ndarray/ndarray/pull/754 +- Implement `fold` for `IndicesIter` by [@jturner314] + https://github.com/rust-ndarray/ndarray/pull/733 + +API changes +----------- + +- Remove alignment restriction on raw views by [@jturner314] + https://github.com/rust-ndarray/ndarray/pull/738 + +Other changes +------------- + +- Fix documentation in ndarray for numpy users by [@jturner314] +- Improve blas version documentation by [@jturner314] +- Doc improvements by [@mockersf] https://github.com/rust-ndarray/ndarray/pull/751 +- Doc and lint related improvements by [@viniciusd] https://github.com/rust-ndarray/ndarray/pull/750 +- Release management by [@bluss] + + Version 0.13.0 (2019-09-23) =========================== @@ -895,3 +939,8 @@ Earlier releases [@termoshtt]: https://github.com/termoshtt [@rth]: https://github.com/rth [@nitsky]: https://github.com/nitsky +[@d-dorazio]: https://github.com/d-dorazio +[@nilgoyette]: https://github.com/nilgoyette +[@TheLortex]: https://github.com/TheLortex +[@mockersf]: https://github.com/mockersf +[@viniciusd]: https://github.com/viniciusd From 869f3245240bba51f1af9456b3114d823717b7d0 Mon Sep 17 00:00:00 2001 From: bluss Date: Sun, 12 Apr 2020 12:53:05 +0200 Subject: [PATCH 3/4] FIX: Temporarily remove rustfmt from CI check, because rustfmt crashes --- scripts/all-tests.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/all-tests.sh b/scripts/all-tests.sh index 9b41b41d8..091c38f89 100755 --- a/scripts/all-tests.sh +++ b/scripts/all-tests.sh @@ -6,7 +6,6 @@ set -e FEATURES=$1 CHANNEL=$2 -([ "$CHANNEL" != "beta" ] || (rustup component add rustfmt && cargo fmt --all -- --check)) cargo build --verbose --no-default-features # Testing both dev and release profiles helps find bugs, especially in low level code cargo test --verbose --no-default-features From c913363a156dd0e5efffae4044021351b0dcf79a Mon Sep 17 00:00:00 2001 From: bluss Date: Sun, 12 Apr 2020 13:07:17 +0200 Subject: [PATCH 4/4] FIX: Rewrite size_hint to fix clippy lint Fix warning 'this match could be written as a `let` statement' --- src/indexes.rs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/indexes.rs b/src/indexes.rs index 0218da51e..9eb7a8b5c 100644 --- a/src/indexes.rs +++ b/src/indexes.rs @@ -273,18 +273,14 @@ where if !self.has_remaining { return (0, Some(0)); } - let l = match self.index { - ref ix => { - let gone = self - .dim - .fortran_strides() - .slice() - .iter() - .zip(ix.slice().iter()) - .fold(0, |s, (&a, &b)| s + a as usize * b as usize); - self.dim.size() - gone - } - }; + let gone = self + .dim + .fortran_strides() + .slice() + .iter() + .zip(self.index.slice().iter()) + .fold(0, |s, (&a, &b)| s + a as usize * b as usize); + let l = self.dim.size() - gone; (l, Some(l)) } }