@@ -2338,7 +2338,7 @@ impl<A, D: Dimension> ArrayRef<A, D>
23382338 /// The implementation creates a view with strides set to zero for the
23392339 /// axes that are to be repeated.
23402340 ///
2341- /// The broadcasting documentation for Numpy has more information.
2341+ /// The broadcasting documentation for NumPy has more information.
23422342 ///
23432343 /// ```
23442344 /// use ndarray::{aview1, aview2};
@@ -2690,7 +2690,7 @@ where
26902690
26912691impl < A , D : Dimension > ArrayRef < A , D >
26922692{
2693- /// Perform an elementwise assigment to `self` from `rhs`.
2693+ /// Perform an elementwise assignment to `self` from `rhs`.
26942694 ///
26952695 /// If their shapes disagree, `rhs` is broadcast to the shape of `self`.
26962696 ///
@@ -2702,7 +2702,7 @@ impl<A, D: Dimension> ArrayRef<A, D>
27022702 self . zip_mut_with ( rhs, |x, y| x. clone_from ( y) ) ;
27032703 }
27042704
2705- /// Perform an elementwise assigment of values cloned from `self` into array or producer `to`.
2705+ /// Perform an elementwise assignment of values cloned from `self` into array or producer `to`.
27062706 ///
27072707 /// The destination `to` can be another array or a producer of assignable elements.
27082708 /// [`AssignElem`] determines how elements are assigned.
@@ -2718,7 +2718,7 @@ impl<A, D: Dimension> ArrayRef<A, D>
27182718 Zip :: from ( self ) . map_assign_into ( to, A :: clone) ;
27192719 }
27202720
2721- /// Perform an elementwise assigment to `self` from element `x`.
2721+ /// Perform an elementwise assignment to `self` from element `x`.
27222722 pub fn fill ( & mut self , x : A )
27232723 where A : Clone
27242724 {
@@ -3212,7 +3212,7 @@ impl<A, D: Dimension> ArrayRef<A, D>
32123212 let mut result = self . to_owned ( ) ;
32133213
32143214 // Return early if the array has zero-length dimensions
3215- if self . shape ( ) . iter ( ) . any ( |s| * s == 0 ) {
3215+ if result . shape ( ) . contains ( & 0 ) {
32163216 return result;
32173217 }
32183218
0 commit comments