@@ -1707,7 +1707,8 @@ where
1707
1707
unsafe { Some ( ArrayView :: new ( self . ptr , dim, broadcast_strides) ) }
1708
1708
}
1709
1709
1710
- /// Calculate the views of two ArrayBases after broadcasting each other, if possible.
1710
+ /// For two arrays or views, find their common shape if possible and
1711
+ /// broadcast them as array views into that shape.
1711
1712
///
1712
1713
/// Return `ShapeError` if their shapes can not be broadcast together.
1713
1714
///
@@ -1720,7 +1721,7 @@ where
1720
1721
/// assert_eq!(a1, arr2(&[[2, 2, 2], [3, 3, 3], [4, 4, 4]]));
1721
1722
/// assert_eq!(b1, arr2(&[[5, 6, 7], [5, 6, 7], [5, 6, 7]]));
1722
1723
/// ```
1723
- pub fn broadcast_with < ' a , ' b , B , S2 , E > ( & ' a self , other : & ' b ArrayBase < S2 , E > ) ->
1724
+ pub ( crate ) fn broadcast_with < ' a , ' b , B , S2 , E > ( & ' a self , other : & ' b ArrayBase < S2 , E > ) ->
1724
1725
Result < ( ArrayView < ' a , A , <D as BroadcastShape < E > >:: Output > , ArrayView < ' b , B , <D as BroadcastShape < E > >:: Output > ) , ShapeError >
1725
1726
where
1726
1727
S : Data < Elem =A > ,
0 commit comments