Implement index macro
Signed-off-by: Julius Koskela <julius.koskela@unikie.com>
This commit is contained in:
parent
e0c4e0407f
commit
7935cf8a1d
@ -27,7 +27,7 @@ macro_rules! shape {
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! index {
|
||||
($array:expr) => {
|
||||
TensorIndex::from($array)
|
||||
($tensor:expr, $indices:expr) => {
|
||||
TensorIndex::from(($tensor.shape().clone(), $indices))
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user