Skip to content

Commit 62dea6a

Browse files
Merge branch 'master' into master
2 parents 4a3fc8f + f9258f2 commit 62dea6a

File tree

17 files changed

+68
-66
lines changed

17 files changed

+68
-66
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- stable
7272
- beta
7373
- nightly
74-
- 1.57.0 # MSRV
74+
- 1.64.0 # MSRV
7575

7676
name: tests/${{ matrix.rust }}
7777
steps:

Cargo.toml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
name = "ndarray"
44
version = "0.15.6"
55
edition = "2018"
6-
rust-version = "1.57"
6+
rust-version = "1.64"
77
authors = [
88
"Ulrik Sverdrup \"bluss\"",
99
"Jim Turner"
@@ -31,12 +31,11 @@ num-integer = { version = "0.1.39", default-features = false }
3131
num-traits = { version = "0.2", default-features = false }
3232
num-complex = { version = "0.4", default-features = false }
3333

34-
# Use via the `rayon` crate feature!
35-
rayon_ = { version = "1.0.3", optional = true, package = "rayon" }
34+
rayon = { version = "1.10.0", optional = true }
3635

3736
approx = { version = "0.5", optional = true , default-features = false }
3837

39-
# Use via the `blas` crate feature!
38+
# Use via the `blas` crate feature
4039
cblas-sys = { version = "0.1.4", optional = true, default-features = false }
4140
libc = { version = "0.2.82", optional = true }
4241

@@ -50,17 +49,18 @@ rawpointer = { version = "0.2" }
5049
defmac = "0.2"
5150
quickcheck = { version = "1.0", default-features = false }
5251
approx = "0.5"
53-
itertools = { version = "0.10.0", default-features = false, features = ["use_std"] }
52+
itertools = { version = "0.13.0", default-features = false, features = ["use_std"] }
5453

5554
[features]
5655
default = ["std"]
5756

5857
# Enable blas usage
5958
# See README for more instructions
60-
blas = ["cblas-sys", "libc"]
59+
blas = ["dep:cblas-sys", "dep:libc"]
6160

61+
serde = ["dep:serde"]
6262
# Old name for the serde feature
63-
serde-1 = ["serde"]
63+
serde-1 = ["dep:serde"]
6464

6565
# These features are used for testing
6666
test = []
@@ -69,7 +69,7 @@ test = []
6969
docs = ["approx", "serde", "rayon"]
7070

7171
std = ["num-traits/std", "matrixmultiply/std"]
72-
rayon = ["rayon_", "std"]
72+
rayon = ["dep:rayon", "std"]
7373

7474
critical-section = ["portable-atomic/critical-section"]
7575

@@ -97,7 +97,18 @@ opt-level = 2
9797
opt-level = 2
9898

9999
[workspace]
100-
members = ["ndarray-rand", "xtest-serialization", "xtest-blas", "xtest-numeric"]
100+
members = [
101+
"ndarray-rand",
102+
"extra-tests/serialization",
103+
"extra-tests/blas",
104+
"extra-tests/numeric",
105+
]
106+
107+
[workspace.dependencies]
108+
ndarray = { path = "." }
109+
num-traits = { version = "0.2", default-features = false }
110+
num-complex = { version = "0.4", default-features = false }
111+
ndarray-rand = { path = "./ndarray-rand" }
101112

102113
[package.metadata.release]
103114
no-dev-version = true

extra-tests/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# Extra Tests
3+
4+
These are test crates whose settings, features and dependencies should be
5+
separate from the main crate.

xtest-blas/Cargo.toml renamed to extra-tests/blas/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@ name = "blas-tests"
33
version = "0.1.0"
44
authors = ["bluss"]
55
publish = false
6+
edition = "2018"
67

78
[lib]
89
test = false
910

1011
[dev-dependencies]
1112
approx = "0.5"
1213
defmac = "0.2"
13-
num-traits = "0.2"
14-
num-complex = { version = "0.4", default-features = false }
14+
num-traits = { workspace = true }
15+
num-complex = { workspace = true }
1516

1617
[dependencies]
17-
ndarray = { path = "..", features = ["approx", "blas"] }
18+
ndarray = { workspace = true, features = ["approx"] }
1819

19-
blas-src = { version = "0.8", optional = true }
20+
blas-src = { version = "0.10", optional = true }
2021

2122
openblas-src = { version = "0.10", optional = true }
2223
netlib-src = { version = "0.8", optional = true }
File renamed without changes.
File renamed without changes.

xtest-numeric/Cargo.toml renamed to extra-tests/numeric/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ edition = "2018"
77

88
[dependencies]
99
approx = "0.5"
10-
ndarray = { path = "..", features = ["approx"] }
11-
ndarray-rand = { path = "../ndarray-rand" }
10+
ndarray = { workspace = true, features = ["approx"] }
11+
ndarray-rand = { workspace = true }
1212
rand_distr = "0.4"
1313

14-
blas-src = { optional = true, version = "0.8", default-features = false, features = ["openblas"] }
14+
blas-src = { optional = true, version = "0.10", default-features = false, features = ["openblas"] }
1515
openblas-src = { optional = true, version = "0.10", default-features = false, features = ["cblas", "system"] }
1616

1717
[dependencies.rand]
1818
version = "0.8.0"
1919
features = ["small_rng"]
2020

2121
[dev-dependencies]
22-
num-traits = { version = "0.2.14", default-features = false }
23-
num-complex = { version = "0.4", default-features = false }
22+
num-traits = { workspace = true }
23+
num-complex = { workspace = true }
2424

2525
[lib]
2626
test = false
File renamed without changes.

xtest-numeric/tests/accuracy.rs renamed to extra-tests/numeric/tests/accuracy.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ fn random_matrix_mul<A>(
172172
) -> (Array2<A>, Array2<A>)
173173
where A: LinalgScalar
174174
{
175-
let m = rng.gen_range(15..512);
176-
let k = rng.gen_range(15..512);
177-
let n = rng.gen_range(15..1560);
175+
let m = rng.gen_range(15..128);
176+
let k = rng.gen_range(15..128);
177+
let n = rng.gen_range(15..512);
178178
let a = generator(Ix2(m, k), rng);
179179
let b = generator(Ix2(n, k), rng);
180180
let c = if use_general {
@@ -261,7 +261,7 @@ fn accurate_mul_with_column_f64()
261261
// pick a few random sizes
262262
let rng = &mut SmallRng::from_entropy();
263263
for i in 0..10 {
264-
let m = rng.gen_range(1..350);
264+
let m = rng.gen_range(1..128);
265265
let k = rng.gen_range(1..350);
266266
let a = gen::<f64, _>(Ix2(m, k), rng);
267267
let b_owner = gen::<f64, _>(Ix2(k, k), rng);

xtest-serialization/Cargo.toml renamed to extra-tests/serialization/Cargo.toml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ name = "serialization-tests"
33
version = "0.1.0"
44
authors = ["bluss"]
55
publish = false
6+
edition = "2018"
67

78
[lib]
89
test = false
910

1011
[dependencies]
11-
ndarray = { path = "..", features = ["serde"] }
12+
ndarray = { workspace = true, features = ["serde"] }
1213

1314
[features]
1415
default = ["ron"]
@@ -20,9 +21,14 @@ default-features = false
2021
[dev-dependencies.serde_json]
2122
version = "1.0.40"
2223

24+
[dev-dependencies.rmp]
25+
# Old version to work with Rust 1.64+
26+
version = "=0.8.10"
27+
2328
[dev-dependencies.rmp-serde]
24-
version = "0.14.0"
29+
# Old version to work with Rust 1.64+
30+
version = "0.14"
2531

2632
[dependencies.ron]
27-
version = "0.5.1"
33+
version = "0.8.1"
2834
optional = true

0 commit comments

Comments
 (0)