Repository: coreylowman/dfdx (language: rust)

Issue:
Expose AddDim to public API
I'm writing an API for my own library that has a generic Device as an input (instead of using `AutoDevice`, that way users can choose what device they want to pass in (or autodevice as default).

My implementation requires using the stacking util (using batches), which requires an extra generic restriction on some Shape: `AddDim<usize>`.


Discussion / hints:
SHould be a relatively simple change if you want to open a PR for this

Fix patch:
diff --git a/src/tensor_ops/mod.rs b/src/tensor_ops/mod.rs
index d25cea6d..0cd5cc90 100644
--- a/src/tensor_ops/mod.rs
+++ b/src/tensor_ops/mod.rs
@@ -264,7 +264,7 @@ pub use slice::slice;
 pub use softmax::softmax;
 pub use sqrt::sqrt;
 pub use square::square;
-pub use stack::TryStack;
+pub use stack::{AddDim, TryStack};
 pub use stddev_to::StddevTo;
 pub use sub::{sub, TrySub};
 pub use sum_to::SumTo;


Test patch: