Skip to content

Commit cae4ab2

Browse files
authored
Merge pull request #180 from cassiersg/upgrade-ndarray
Support ndarray 0.15
2 parents 702c44f + 0b6c506 commit cae4ab2

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,21 @@ jobs:
8787
run: pip install maturin poetry toml
8888
- name: Create an isolated example directory
8989
run: cp -r examples/simple-extension/ ../simple-extension-msrv
90-
- name: Edit Cargo.toml
90+
- name: Edit Cargo.toml and change the path of rust-numpy
9191
run: |
9292
import toml
9393
cargo_toml = toml.load("Cargo.toml")
94+
cargo_toml["dependencies"]["numpy"]["path"] = "../rust-numpy"
9495
cargo_toml["dependencies"]["ndarray"] = "0.13.1"
9596
cargo_toml["dependencies"]["num-complex"] = "0.2.4"
96-
cargo_toml["dependencies"]["numpy"]["path"] = "../rust-numpy"
9797
with open("Cargo.toml", "w") as f:
9898
toml.dump(cargo_toml, f)
9999
working-directory: ../simple-extension-msrv
100100
shell: python
101-
- name: Remove ndarray 0.14.0
102-
run: cargo update -p ndarray:0.14.0 --precise 0.13.1
101+
- name: Use ndarray 0.13.1
102+
run: |
103+
cargo generate-lockfile
104+
cargo update -p $(cargo pkgid -p ndarray 2>&1 >/dev/null | grep 0.15 | sed -e 's/^[ \t]*//') --precise 0.13.1
103105
working-directory: ../simple-extension-msrv
104106
- name: Test Example
105107
run: |

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cfg-if = "0.1"
1818
libc = "0.2"
1919
num-complex = ">= 0.2, <= 0.4"
2020
num-traits = "0.2"
21-
ndarray = ">= 0.13, < 0.15"
21+
ndarray = ">= 0.13, < 0.16"
2222
pyo3 = { version = "0.13", default-features = false }
2323

2424
[dev-dependencies]
@@ -29,6 +29,5 @@ pyo3 = "0.13"
2929
default = []
3030
rayon = ["ndarray/rayon"]
3131

32-
3332
[workspace]
34-
members = ["examples/*"]
33+
members = ["examples/*"]

examples/linalg/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ crate-type = ["cdylib"]
1010

1111
[dependencies]
1212
numpy = { path = "../.." }
13-
ndarray = "0.14"
14-
ndarray-linalg = { version = "0.13", features = ["openblas-static"] }
13+
ndarray = "0.15"
14+
# ndarray-linalg = { version = "0.13", features = ["openblas-static"] }
15+
ndarray-linalg = { git = "https://github.com/rust-ndarray/ndarray-linalg", features = ["openblas-static"] }
1516

1617
[dependencies.pyo3]
1718
version = "0.13"

examples/simple-extension/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ crate-type = ["cdylib"]
1010

1111
[dependencies]
1212
numpy = { path = "../.." }
13-
ndarray = "0.14"
14-
num-complex = "0.3"
13+
ndarray = "0.15.2"
14+
num-complex = "0.4.0"
1515

1616
[dependencies.pyo3]
1717
version = "0.13"

0 commit comments

Comments
 (0)