File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,11 @@ fn test_from_shape_fn() {
10
10
|( i, j) | f64:: sin ( i as f64 / step) * f64:: cos ( j as f64 / step) ) ;
11
11
assert_eq ! ( h. shape( ) , & [ 5 , 5 ] ) ;
12
12
}
13
+
14
+ #[ test]
15
+ fn test_dimension_zero ( ) {
16
+ let a: Array2 < f32 > = Array2 :: from ( vec ! [ [ ] , [ ] , [ ] ] ) ;
17
+ assert_eq ! ( vec![ 0. ; 0 ] , a. into_raw_vec( ) ) ;
18
+ let a: Array3 < f32 > = Array3 :: from ( vec ! [ [ [ ] ] , [ [ ] ] , [ [ ] ] ] ) ;
19
+ assert_eq ! ( vec![ 0. ; 0 ] , a. into_raw_vec( ) ) ;
20
+ }
Original file line number Diff line number Diff line change @@ -1112,11 +1112,3 @@ fn test_array_clone_same_view() {
1112
1112
let b = a. clone ( ) ;
1113
1113
assert_eq ! ( a, b) ;
1114
1114
}
1115
-
1116
- #[ test]
1117
- fn test_dimension_zero ( ) {
1118
- let a: Array2 < f32 > = arr2 ( & [ [ ] , [ ] , [ ] ] ) ;
1119
- assert_eq ! ( vec![ 0. ; 0 ] , a. into_raw_vec( ) ) ;
1120
- let a: Array3 < f32 > = arr3 ( & [ [ [ ] ] , [ [ ] ] , [ [ ] ] ] ) ;
1121
- assert_eq ! ( vec![ 0. ; 0 ] , a. into_raw_vec( ) ) ;
1122
- }
You can’t perform that action at this time.
0 commit comments