@@ -2338,7 +2338,7 @@ impl<A, D: Dimension> ArrayRef<A, D>
2338
2338
/// The implementation creates a view with strides set to zero for the
2339
2339
/// axes that are to be repeated.
2340
2340
///
2341
- /// The broadcasting documentation for Numpy has more information.
2341
+ /// The broadcasting documentation for NumPy has more information.
2342
2342
///
2343
2343
/// ```
2344
2344
/// use ndarray::{aview1, aview2};
@@ -2690,7 +2690,7 @@ where
2690
2690
2691
2691
impl < A , D : Dimension > ArrayRef < A , D >
2692
2692
{
2693
- /// Perform an elementwise assigment to `self` from `rhs`.
2693
+ /// Perform an elementwise assignment to `self` from `rhs`.
2694
2694
///
2695
2695
/// If their shapes disagree, `rhs` is broadcast to the shape of `self`.
2696
2696
///
@@ -2702,7 +2702,7 @@ impl<A, D: Dimension> ArrayRef<A, D>
2702
2702
self . zip_mut_with ( rhs, |x, y| x. clone_from ( y) ) ;
2703
2703
}
2704
2704
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`.
2706
2706
///
2707
2707
/// The destination `to` can be another array or a producer of assignable elements.
2708
2708
/// [`AssignElem`] determines how elements are assigned.
@@ -2718,7 +2718,7 @@ impl<A, D: Dimension> ArrayRef<A, D>
2718
2718
Zip :: from ( self ) . map_assign_into ( to, A :: clone) ;
2719
2719
}
2720
2720
2721
- /// Perform an elementwise assigment to `self` from element `x`.
2721
+ /// Perform an elementwise assignment to `self` from element `x`.
2722
2722
pub fn fill ( & mut self , x : A )
2723
2723
where A : Clone
2724
2724
{
@@ -3212,7 +3212,7 @@ impl<A, D: Dimension> ArrayRef<A, D>
3212
3212
let mut result = self . to_owned ( ) ;
3213
3213
3214
3214
// Return early if the array has zero-length dimensions
3215
- if self . shape ( ) . iter ( ) . any ( |s| * s == 0 ) {
3215
+ if result . shape ( ) . contains ( & 0 ) {
3216
3216
return result;
3217
3217
}
3218
3218
0 commit comments