Implement index macro

Signed-off-by: Julius Koskela <julius.koskela@unikie.com>
This commit is contained in:
Julius Koskela 2024-01-03 22:59:18 +02:00
parent e0c4e0407f
commit 7935cf8a1d
Signed by: julius
GPG Key ID: 5A7B7F4897C2914B

View File

@ -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))
};
}