@@ -9,6 +9,7 @@ use ndarray::prelude::*;
9
9
use ndarray:: {
10
10
rcarr2,
11
11
arr3,
12
+ multislice,
12
13
} ;
13
14
use ndarray:: indices;
14
15
use defmac:: defmac;
@@ -334,14 +335,14 @@ fn test_multislice() {
334
335
{
335
336
let copy = arr. clone( ) ;
336
337
assert_eq!(
337
- multislice!( arr, ( mut s1, mut s2) ) ,
338
+ multislice!( arr, ( mut s1, mut s2, ) ) ,
338
339
( copy. clone( ) . slice_mut( s1) , copy. clone( ) . slice_mut( s2) )
339
340
) ;
340
341
}
341
342
{
342
343
let copy = arr. clone( ) ;
343
344
assert_eq!(
344
- multislice!( arr, ( mut s1, s2) ) ,
345
+ multislice!( arr, ( mut s1, s2, ) ) ,
345
346
( copy. clone( ) . slice_mut( s1) , copy. clone( ) . slice( s2) )
346
347
) ;
347
348
}
@@ -362,6 +363,7 @@ fn test_multislice() {
362
363
} ) ;
363
364
let mut arr = Array1 :: from_iter ( 0 ..48 ) . into_shape ( ( 8 , 6 ) ) . unwrap ( ) ;
364
365
366
+ assert_eq ! ( ( arr. clone( ) . view( ) , ) , multislice!( arr, ( s![ .., ..] , ) ) ) ;
365
367
test_multislice ! ( & mut arr, s![ 0 , ..] , s![ 1 , ..] ) ;
366
368
test_multislice ! ( & mut arr, s![ 0 , ..] , s![ -1 , ..] ) ;
367
369
test_multislice ! ( & mut arr, s![ 0 , ..] , s![ 1 .., ..] ) ;
0 commit comments