Skip to content

Commit d32248d

Browse files
blussadamreichold
andauthored
Apply examples changes from code review
Co-authored-by: Adam Reichold <[email protected]>
1 parent ee7f435 commit d32248d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

README-quick-start.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,7 @@ row: [[100, 101, 102],
295295
## Shape Manipulation
296296

297297
### Changing the shape of an array
298-
The shape of an array can be changed with `into_shape_with_order` method.
299-
(One can also use `to_shape` for this.)
298+
The shape of an array can be changed with the `into_shape_with_order` or `to_shape` method.
300299

301300
````rust
302301
use ndarray::prelude::*;

src/impl_methods.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1978,7 +1978,7 @@ where
19781978
/// elements is accepted, but the source array or view must be in standard
19791979
/// or column-major (Fortran) layout.
19801980
///
1981-
/// **Note** that `.into_shape_with_order()` "moves" elements differently depending on if the input array
1981+
/// **Note** that `.into_shape()` "moves" elements differently depending on if the input array
19821982
/// is C-contig or F-contig, it follows the index order that corresponds to the memory order.
19831983
/// Prefer to use `.to_shape()` or `.into_shape_with_order()`.
19841984
///
@@ -1992,7 +1992,7 @@ where
19921992
/// use ndarray::{aview1, aview2};
19931993
///
19941994
/// assert!(
1995-
/// aview1(&[1., 2., 3., 4.]).into_shape_with_order((2, 2)).unwrap()
1995+
/// aview1(&[1., 2., 3., 4.]).into_shape((2, 2)).unwrap()
19961996
/// == aview2(&[[1., 2.],
19971997
/// [3., 4.]])
19981998
/// );
@@ -2117,7 +2117,6 @@ where
21172117
A: Clone,
21182118
E: IntoDimension,
21192119
{
2120-
//return self.clone().into_shape_clone(shape).unwrap();
21212120
let shape = shape.into_dimension();
21222121
if size_of_shape_checked(&shape) != Ok(self.dim.size()) {
21232122
panic!(

0 commit comments

Comments
 (0)