Skip to content

Commit c357f0d

Browse files
committed
updated windows method doc description to reference windows_with_stride
1 parent 0449bae commit c357f0d

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

src/impl_methods.rs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,37 +1418,7 @@ where
14181418
/// The windows are all distinct overlapping views of size `window_size`
14191419
/// that fit into the array's shape.
14201420
///
1421-
/// This produces no elements if the window size is larger than the actual array size along any
1422-
/// axis.
1423-
///
1424-
/// The produced element is an `ArrayView<A, D>` with exactly the dimension
1425-
/// `window_size`.
1426-
///
1427-
/// **Panics** if any dimension of `window_size` is zero.<br>
1428-
/// (**Panics** if `D` is `IxDyn` and `window_size` does not match the
1429-
/// number of array axes.)
1430-
///
1431-
/// This is an illustration of the 2×2 windows in a 3×4 array:
1432-
///
1433-
/// ```text
1434-
/// ──▶ Axis(1)
1435-
///
1436-
/// │ ┏━━━━━┳━━━━━┱─────┬─────┐ ┌─────┲━━━━━┳━━━━━┱─────┐ ┌─────┬─────┲━━━━━┳━━━━━┓
1437-
/// ▼ ┃ a₀₀ ┃ a₀₁ ┃ │ │ │ ┃ a₀₁ ┃ a₀₂ ┃ │ │ │ ┃ a₀₂ ┃ a₀₃ ┃
1438-
/// Axis(0) ┣━━━━━╋━━━━━╉─────┼─────┤ ├─────╊━━━━━╋━━━━━╉─────┤ ├─────┼─────╊━━━━━╋━━━━━┫
1439-
/// ┃ a₁₀ ┃ a₁₁ ┃ │ │ │ ┃ a₁₁ ┃ a₁₂ ┃ │ │ │ ┃ a₁₂ ┃ a₁₃ ┃
1440-
/// ┡━━━━━╇━━━━━╃─────┼─────┤ ├─────╄━━━━━╇━━━━━╃─────┤ ├─────┼─────╄━━━━━╇━━━━━┩
1441-
/// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1442-
/// └─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┘
1443-
///
1444-
/// ┌─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┐
1445-
/// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
1446-
/// ┢━━━━━╈━━━━━╅─────┼─────┤ ├─────╆━━━━━╈━━━━━╅─────┤ ├─────┼─────╆━━━━━╈━━━━━┪
1447-
/// ┃ a₁₀ ┃ a₁₁ ┃ │ │ │ ┃ a₁₁ ┃ a₁₂ ┃ │ │ │ ┃ a₁₂ ┃ a₁₃ ┃
1448-
/// ┣━━━━━╋━━━━━╉─────┼─────┤ ├─────╊━━━━━╋━━━━━╉─────┤ ├─────┼─────╊━━━━━╋━━━━━┫
1449-
/// ┃ a₂₀ ┃ a₂₁ ┃ │ │ │ ┃ a₂₁ ┃ a₂₂ ┃ │ │ │ ┃ a₂₂ ┃ a₂₃ ┃
1450-
/// ┗━━━━━┻━━━━━┹─────┴─────┘ └─────┺━━━━━┻━━━━━┹─────┘ └─────┴─────┺━━━━━┻━━━━━┛
1451-
/// ```
1421+
/// This is essentially equivalent to [`.windows_with_stride()`] with unit stride.
14521422
pub fn windows<E>(&self, window_size: E) -> Windows<'_, A, D>
14531423
where
14541424
E: IntoDimension<Dim = D>,

0 commit comments

Comments
 (0)