diff --git a/src/impl_methods.rs b/src/impl_methods.rs
index dd0034b26..5d7df7781 100644
--- a/src/impl_methods.rs
+++ b/src/impl_methods.rs
@@ -811,12 +811,12 @@ where
/// [[ 6, 7, 8], // -- row 1, 0
/// [ 9, 10, 11]]]); // -- row 1, 1
///
- /// // `genrows` will yield the four generalized rows of the array.
- /// for row in a.genrows() {
+ /// // `rows` will yield the four generalized rows of the array.
+ /// for row in a.rows() {
/// /* loop body */
/// }
/// ```
- pub fn genrows(&self) -> Lanes<'_, A, D::Smaller>
+ pub fn rows(&self) -> Lanes<'_, A, D::Smaller>
where
S: Data,
{
@@ -827,11 +827,19 @@ where
Lanes::new(self.view(), Axis(n - 1))
}
+ #[deprecated(note="Renamed to .rows()", since="0.15")]
+ pub fn genrows(&self) -> Lanes<'_, A, D::Smaller>
+ where
+ S: Data,
+ {
+ self.rows()
+ }
+
/// Return a producer and iterable that traverses over the *generalized*
/// rows of the array and yields mutable array views.
///
/// Iterator element is `ArrayView1` (1D read-write array view).
- pub fn genrows_mut(&mut self) -> LanesMut<'_, A, D::Smaller>
+ pub fn rows_mut(&mut self) -> LanesMut<'_, A, D::Smaller>
where
S: DataMut,
{
@@ -842,6 +850,14 @@ where
LanesMut::new(self.view_mut(), Axis(n - 1))
}
+ #[deprecated(note="Renamed to .rows_mut()", since="0.15")]
+ pub fn genrows_mut(&mut self) -> LanesMut<'_, A, D::Smaller>
+ where
+ S: DataMut,
+ {
+ self.rows_mut()
+ }
+
/// Return a producer and iterable that traverses over the *generalized*
/// columns of the array. For a 2D array these are the regular columns.
///
@@ -863,29 +879,53 @@ where
/// let a = arr3(&[[[ 0, 1, 2], [ 3, 4, 5]],
/// [[ 6, 7, 8], [ 9, 10, 11]]]);
///
- /// // Here `gencolumns` will yield the six generalized columns of the array.
- /// for row in a.gencolumns() {
+ /// // Here `columns` will yield the six generalized columns of the array.
+ /// for row in a.columns() {
/// /* loop body */
/// }
/// ```
- pub fn gencolumns(&self) -> Lanes<'_, A, D::Smaller>
+ pub fn columns(&self) -> Lanes<'_, A, D::Smaller>
where
S: Data,
{
Lanes::new(self.view(), Axis(0))
}
+ /// Return a producer and iterable that traverses over the *generalized*
+ /// columns of the array. For a 2D array these are the regular columns.
+ ///
+ /// Renamed to `.columns()`
+ #[deprecated(note="Renamed to .columns()", since="0.15")]
+ pub fn gencolumns(&self) -> Lanes<'_, A, D::Smaller>
+ where
+ S: Data,
+ {
+ self.columns()
+ }
+
/// Return a producer and iterable that traverses over the *generalized*
/// columns of the array and yields mutable array views.
///
/// Iterator element is `ArrayView1` (1D read-write array view).
- pub fn gencolumns_mut(&mut self) -> LanesMut<'_, A, D::Smaller>
+ pub fn columns_mut(&mut self) -> LanesMut<'_, A, D::Smaller>
where
S: DataMut,
{
LanesMut::new(self.view_mut(), Axis(0))
}
+ /// Return a producer and iterable that traverses over the *generalized*
+ /// columns of the array and yields mutable array views.
+ ///
+ /// Renamed to `.columns_mut()`
+ #[deprecated(note="Renamed to .columns_mut()", since="0.15")]
+ pub fn gencolumns_mut(&mut self) -> LanesMut<'_, A, D::Smaller>
+ where
+ S: DataMut,
+ {
+ self.columns_mut()
+ }
+
/// Return a producer and iterable that traverses over all 1D lanes
/// pointing in the direction of `axis`.
///