Skip to content

Commit c5e06fb

Browse files
committed
DOC: Correct typo and improve maybe_uninit's example
The example is very far from perfect, but it works ;) In the long run maybe the example's assign_to function can have a place in ndarray
1 parent 66c9d2b commit c5e06fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/impl_constructors.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ where
533533
/// use ndarray::Zip;
534534
/// use ndarray::Axis;
535535
///
536-
/// // Example Task: Let's create a transposed copy of the input
536+
/// // Example Task: Let's create a column shifted copy of the input
537537
///
538538
/// fn shift_by_two(a: &Array2<f32>) -> Array2<f32> {
539539
/// // create an uninitialized array
@@ -553,6 +553,8 @@ where
553553
///
554554
/// use ndarray::{IntoNdProducer, AssignElem};
555555
///
556+
/// // This function clones elements from the first input to the second;
557+
/// // the two producers must have the same shape
556558
/// fn assign_to<'a, P1, P2, A>(from: P1, to: P2)
557559
/// where P1: IntoNdProducer<Item = &'a A>,
558560
/// P2: IntoNdProducer<Dim = P1::Dim>,

0 commit comments

Comments
 (0)