Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of autumnai#57 - alexandermorozov:feat-into-tensor-desc, r…
…=hobofan feat/tensor: implement IntoTensorDesc for [usize; N], N=1...6 Currently dimensions of a tensor can be specified with usize, tuples, Vecs and slices: SharedTensor::new(backend, &10) SharedTensor::new(backend, &(10, 2)) SharedTensor::new(backend, &vec![10, 2]) In cases like this, vec! causes an unneeded allocation and is a bit more verbose than possible. Usize/tuple syntax looks somewhat irregular. It would be nice to be able to express tensor creation like this: SharedTensor::new(backend, &[10, 2]) But Rust doesn't autocoerce `&[usize; _]` into `&[usize]`. This patch adds explicit implementations to make this use case work. Package version is also bumped to make it possible to depend on this feature.
- Loading branch information