Skip to content

Commit 2527083

Browse files
committed
Add function IxDyn
1 parent f7d4114 commit 2527083

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/aliases.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ pub fn Ix6(i0: Ix, i1: Ix, i2: Ix, i3: Ix, i4: Ix, i5: Ix) -> Ix6 {
4545
Dim::new([i0, i1, i2, i3, i4, i5])
4646
}
4747

48+
/// Create a dynamic-dimensional index
49+
#[allow(non_snake_case)]
50+
#[inline(always)]
51+
pub fn IxDyn(ix: &[Ix]) -> IxDyn {
52+
Dim(ix)
53+
}
54+
4855
/// zero-dimensionial
4956
pub type Ix0 = Dim<[Ix; 0]>;
5057
/// one-dimensional

0 commit comments

Comments
 (0)