@@ -811,12 +811,12 @@ where
811
811
/// [[ 6, 7, 8], // -- row 1, 0
812
812
/// [ 9, 10, 11]]]); // -- row 1, 1
813
813
///
814
- /// // `genrows ` will yield the four generalized rows of the array.
815
- /// for row in a.genrows () {
814
+ /// // `rows ` will yield the four generalized rows of the array.
815
+ /// for row in a.rows () {
816
816
/// /* loop body */
817
817
/// }
818
818
/// ```
819
- pub fn genrows ( & self ) -> Lanes < ' _ , A , D :: Smaller >
819
+ pub fn rows ( & self ) -> Lanes < ' _ , A , D :: Smaller >
820
820
where
821
821
S : Data ,
822
822
{
@@ -827,11 +827,19 @@ where
827
827
Lanes :: new ( self . view ( ) , Axis ( n - 1 ) )
828
828
}
829
829
830
+ #[ deprecated( note="Renamed to .rows()" , since="0.15.0" ) ]
831
+ pub fn genrows ( & self ) -> Lanes < ' _ , A , D :: Smaller >
832
+ where
833
+ S : Data ,
834
+ {
835
+ self . rows ( )
836
+ }
837
+
830
838
/// Return a producer and iterable that traverses over the *generalized*
831
839
/// rows of the array and yields mutable array views.
832
840
///
833
841
/// Iterator element is `ArrayView1<A>` (1D read-write array view).
834
- pub fn genrows_mut ( & mut self ) -> LanesMut < ' _ , A , D :: Smaller >
842
+ pub fn rows_mut ( & mut self ) -> LanesMut < ' _ , A , D :: Smaller >
835
843
where
836
844
S : DataMut ,
837
845
{
@@ -842,6 +850,14 @@ where
842
850
LanesMut :: new ( self . view_mut ( ) , Axis ( n - 1 ) )
843
851
}
844
852
853
+ #[ deprecated( note="Renamed to .rows_mut()" , since="0.15.0" ) ]
854
+ pub fn genrows_mut ( & mut self ) -> LanesMut < ' _ , A , D :: Smaller >
855
+ where
856
+ S : DataMut ,
857
+ {
858
+ self . rows_mut ( )
859
+ }
860
+
845
861
/// Return a producer and iterable that traverses over the *generalized*
846
862
/// columns of the array. For a 2D array these are the regular columns.
847
863
///
@@ -863,29 +879,53 @@ where
863
879
/// let a = arr3(&[[[ 0, 1, 2], [ 3, 4, 5]],
864
880
/// [[ 6, 7, 8], [ 9, 10, 11]]]);
865
881
///
866
- /// // Here `gencolumns ` will yield the six generalized columns of the array.
867
- /// for row in a.gencolumns () {
882
+ /// // Here `columns ` will yield the six generalized columns of the array.
883
+ /// for row in a.columns () {
868
884
/// /* loop body */
869
885
/// }
870
886
/// ```
871
- pub fn gencolumns ( & self ) -> Lanes < ' _ , A , D :: Smaller >
887
+ pub fn columns ( & self ) -> Lanes < ' _ , A , D :: Smaller >
872
888
where
873
889
S : Data ,
874
890
{
875
891
Lanes :: new ( self . view ( ) , Axis ( 0 ) )
876
892
}
877
893
894
+ /// Return a producer and iterable that traverses over the *generalized*
895
+ /// columns of the array. For a 2D array these are the regular columns.
896
+ ///
897
+ /// Renamed to `.columns()`
898
+ #[ deprecated( note="Renamed to .columns()" , since="0.15.0" ) ]
899
+ pub fn gencolumns ( & self ) -> Lanes < ' _ , A , D :: Smaller >
900
+ where
901
+ S : Data ,
902
+ {
903
+ self . columns ( )
904
+ }
905
+
878
906
/// Return a producer and iterable that traverses over the *generalized*
879
907
/// columns of the array and yields mutable array views.
880
908
///
881
909
/// Iterator element is `ArrayView1<A>` (1D read-write array view).
882
- pub fn gencolumns_mut ( & mut self ) -> LanesMut < ' _ , A , D :: Smaller >
910
+ pub fn columns_mut ( & mut self ) -> LanesMut < ' _ , A , D :: Smaller >
883
911
where
884
912
S : DataMut ,
885
913
{
886
914
LanesMut :: new ( self . view_mut ( ) , Axis ( 0 ) )
887
915
}
888
916
917
+ /// Return a producer and iterable that traverses over the *generalized*
918
+ /// columns of the array and yields mutable array views.
919
+ ///
920
+ /// Renamed to `.columns_mut()`
921
+ #[ deprecated( note="Renamed to .columns_mut()" , since="0.15.0" ) ]
922
+ pub fn gencolumns_mut ( & mut self ) -> LanesMut < ' _ , A , D :: Smaller >
923
+ where
924
+ S : DataMut ,
925
+ {
926
+ self . columns_mut ( )
927
+ }
928
+
889
929
/// Return a producer and iterable that traverses over all 1D lanes
890
930
/// pointing in the direction of `axis`.
891
931
///
0 commit comments