From 5cf75720e166824e444c0cdea389ea5cbf29fe10 Mon Sep 17 00:00:00 2001 From: bluss Date: Sat, 28 Nov 2020 16:25:54 +0100 Subject: [PATCH 1/3] API: Bump num-complex to version 0.3 Use num-complex without activating std (because ndarray does not need it by itself) - this means we can't use norm by default in the test. --- Cargo.toml | 2 +- tests/complex.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 48fad0822..22fe19e76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ test = true [dependencies] num-integer = "0.1.39" num-traits = "0.2" -num-complex = "0.2" +num-complex = { version = "0.3", default-features = false } rayon = { version = "1.0.3", optional = true } diff --git a/tests/complex.rs b/tests/complex.rs index 543889dd7..1b52b2671 100644 --- a/tests/complex.rs +++ b/tests/complex.rs @@ -10,7 +10,7 @@ fn c(re: T, im: T) -> Complex { #[test] fn complex_mat_mul() { let a = arr2(&[[c(3., 4.), c(2., 0.)], [c(0., -2.), c(3., 0.)]]); - let b = (&a * c(3., 0.)).map(|c| 5. * c / c.norm()); + let b = (&a * c(3., 0.)).map(|c| 5. * c / c.norm_sqr()); println!("{:>8.2}", b); let e = Array::eye(2); let r = a.dot(&e); From a9b4ab86f90ad23a544a80fe1e07933d62a8555d Mon Sep 17 00:00:00 2001 From: bluss Date: Sat, 28 Nov 2020 16:26:43 +0100 Subject: [PATCH 2/3] API: Bump approx to 0.4 --- Cargo.toml | 4 ++-- blas-tests/Cargo.toml | 2 +- numeric-tests/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 22fe19e76..30c9fada6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ num-complex = { version = "0.3", default-features = false } rayon = { version = "1.0.3", optional = true } -approx = { version = "0.3.2", optional = true } +approx = { version = "0.4", optional = true } # Use via the `blas` crate feature! cblas-sys = { version = "0.1.4", optional = true, default-features = false } @@ -47,7 +47,7 @@ rawpointer = { version = "0.2" } [dev-dependencies] defmac = "0.2" quickcheck = { version = "0.9", default-features = false } -approx = "0.3.2" +approx = "0.4" itertools = { version = "0.9.0", default-features = false, features = ["use_std"] } [features] diff --git a/blas-tests/Cargo.toml b/blas-tests/Cargo.toml index d7b701084..da9aad98f 100644 --- a/blas-tests/Cargo.toml +++ b/blas-tests/Cargo.toml @@ -8,7 +8,7 @@ publish = false test = false [dev-dependencies] -approx = "0.3.2" +approx = "0.4" ndarray = { path = "../", features = ["approx", "blas"] } blas-src = { version = "0.6.1", default-features = false, features = ["openblas"] } openblas-src = { version = "0.9.0", default-features = false, features = ["cblas", "system"] } diff --git a/numeric-tests/Cargo.toml b/numeric-tests/Cargo.toml index dc1261512..d6549eed4 100644 --- a/numeric-tests/Cargo.toml +++ b/numeric-tests/Cargo.toml @@ -5,7 +5,7 @@ authors = ["bluss"] publish = false [dependencies] -approx = "0.3.2" +approx = "0.4" ndarray = { path = "..", features = ["approx"] } ndarray-rand = { path = "../ndarray-rand/" } rand_distr = "0.2.1" From 84eeb11d1d477d54e52ef5f7dc9df784834a0c8d Mon Sep 17 00:00:00 2001 From: bluss Date: Sat, 28 Nov 2020 16:26:54 +0100 Subject: [PATCH 3/3] MAINT: Write license spec in Cargo.toml in the more spec-correct way --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 30c9fada6..362d62afa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ authors = [ "bluss", "Jim Turner" ] -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" readme = "README-crates.io.md" repository = "https://github.com/rust-ndarray/ndarray"