@@ -68,17 +68,16 @@ fn arrayviewmut_shrink_lifetime<'a, 'b: 'a>(view: ArrayViewMut1<'b, f64>) -> Arr
6868}
6969
7070#[ test]
71- #[ cfg( feature = "std" ) ]
7271fn test_mat_mul ( )
7372{
7473 // smoke test, a big matrix multiplication of uneven size
7574 let ( n, m) = ( 45 , 33 ) ;
76- let a = ArcArray :: linspace ( 0. , ( ( n * m) - 1 ) as f32 , n as usize * m as usize )
75+ let a = Array :: from_iter ( 0 .. ( n * m) )
7776 . into_shape_with_order ( ( n, m) )
7877 . unwrap ( ) ;
79- let b = ArcArray :: eye ( m) ;
78+ let b = Array :: eye ( m) ;
8079 assert_eq ! ( a. dot( & b) , a) ;
81- let c = ArcArray :: eye ( n) ;
80+ let c = Array :: eye ( n) ;
8281 assert_eq ! ( c. dot( & a) , a) ;
8382}
8483
@@ -692,32 +691,30 @@ fn test_cow_shrink()
692691}
693692
694693#[ test]
695- #[ cfg( feature = "std" ) ]
696694fn test_sub ( )
697695{
698- let mat = ArcArray :: linspace ( 0. , 15. , 16 )
696+ let mat = Array :: from_iter ( 0 .. 16 )
699697 . into_shape_with_order ( ( 2 , 4 , 2 ) )
700698 . unwrap ( ) ;
701699 let s1 = mat. index_axis ( Axis ( 0 ) , 0 ) ;
702700 let s2 = mat. index_axis ( Axis ( 0 ) , 1 ) ;
703701 assert_eq ! ( s1. shape( ) , & [ 4 , 2 ] ) ;
704702 assert_eq ! ( s2. shape( ) , & [ 4 , 2 ] ) ;
705- let n = ArcArray :: linspace ( 8. , 15. , 8 )
703+ let n = Array :: from_iter ( 8 .. 16 )
706704 . into_shape_with_order ( ( 4 , 2 ) )
707705 . unwrap ( ) ;
708706 assert_eq ! ( n, s2) ;
709- let m = ArcArray :: from ( vec ! [ 2. , 3. , 10. , 11. ] )
707+ let m = Array :: from ( vec ! [ 2 , 3 , 10 , 11 ] )
710708 . into_shape_with_order ( ( 2 , 2 ) )
711709 . unwrap ( ) ;
712710 assert_eq ! ( m, mat. index_axis( Axis ( 1 ) , 1 ) ) ;
713711}
714712
715713#[ should_panic]
716714#[ test]
717- #[ cfg( feature = "std" ) ]
718715fn test_sub_oob_1 ( )
719716{
720- let mat = ArcArray :: linspace ( 0. , 15. , 16 )
717+ let mat = Array :: from_iter ( 0 .. 16 )
721718 . into_shape_with_order ( ( 2 , 4 , 2 ) )
722719 . unwrap ( ) ;
723720 mat. index_axis ( Axis ( 0 ) , 2 ) ;
@@ -1845,7 +1842,6 @@ fn scalar_ops()
18451842}
18461843
18471844#[ test]
1848- #[ cfg( feature = "std" ) ]
18491845fn split_at ( )
18501846{
18511847 let mut a = arr2 ( & [ [ 1. , 2. ] , [ 3. , 4. ] ] ) ;
@@ -1864,7 +1860,7 @@ fn split_at()
18641860 }
18651861 assert_eq ! ( a, arr2( & [ [ 1. , 5. ] , [ 8. , 4. ] ] ) ) ;
18661862
1867- let b = ArcArray :: linspace ( 0. , 59. , 60 )
1863+ let b = ArcArray :: from_iter ( 0 .. 60 )
18681864 . into_shape_with_order ( ( 3 , 4 , 5 ) )
18691865 . unwrap ( ) ;
18701866
@@ -1874,9 +1870,9 @@ fn split_at()
18741870 assert_eq ! (
18751871 left,
18761872 arr3( & [
1877- [ [ 0. , 1. ] , [ 5. , 6. ] , [ 10. , 11. ] , [ 15. , 16. ] ] ,
1878- [ [ 20. , 21. ] , [ 25. , 26. ] , [ 30. , 31. ] , [ 35. , 36. ] ] ,
1879- [ [ 40. , 41. ] , [ 45. , 46. ] , [ 50. , 51. ] , [ 55. , 56. ] ]
1873+ [ [ 0 , 1 ] , [ 5 , 6 ] , [ 10 , 11 ] , [ 15 , 16 ] ] ,
1874+ [ [ 20 , 21 ] , [ 25 , 26 ] , [ 30 , 31 ] , [ 35 , 36 ] ] ,
1875+ [ [ 40 , 41 ] , [ 45 , 46 ] , [ 50 , 51 ] , [ 55 , 56 ] ]
18801876 ] )
18811877 ) ;
18821878
0 commit comments