Skip to content

Commit

Permalink
bleeding-edge ndarray
Browse files Browse the repository at this point in the history
They added `tril` and `triu` in rust-ndarray/ndarray#1386, but the
maintainers are busy, and there hasn't been an ndarray release since
July 2022 (despite active development?). I could write my own tril (or
copy–paste it), or ... we could run tip of master?! It is written that
Y.O.L.O.
  • Loading branch information
zackmdavis committed Aug 3, 2024
1 parent 417fa7b commit c38bbbe
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
27 changes: 21 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
approx = "0.4.0"
approx = "0.5"
lazy_static = "*"
ndarray = {version = "*", features = ["approx"]}
ndarray-rand = "0.14.0"
ndarray = {git = "https://github.com/rust-ndarray/ndarray", features = ["approx"]}
ndarray-rand = { git = "https://github.com/rust-ndarray/ndarray" }
num-traits = "*"
rand = "*"
topological-sort = "*"
4 changes: 2 additions & 2 deletions src/core/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl Operation for Reshape {
.array
.borrow()
.clone()
.into_shape(self.new_shape.clone())
.into_shape_with_order(self.new_shape.clone())
.expect("input must match");
let origin = Origin {
operation: Box::new(Reshape {
Expand All @@ -239,7 +239,7 @@ impl Operation for Reshape {
assert!(arg_index == 0);
out_gradient
.clone()
.into_shape(args[0].array.borrow().shape())
.into_shape_with_order(args[0].array.borrow().shape())
.expect("input shape should match")
}
}
Expand Down

0 comments on commit c38bbbe

Please sign in to comment.