diff --git a/src/impl_methods.rs b/src/impl_methods.rs index 815243ed1..0e8cbc4e2 100644 --- a/src/impl_methods.rs +++ b/src/impl_methods.rs @@ -1707,7 +1707,8 @@ where unsafe { Some(ArrayView::new(self.ptr, dim, broadcast_strides)) } } - /// Calculate the views of two ArrayBases after broadcasting each other, if possible. + /// For two arrays or views, find their common shape if possible and + /// broadcast them as array views into that shape. /// /// Return `ShapeError` if their shapes can not be broadcast together. /// @@ -1720,7 +1721,7 @@ where /// assert_eq!(a1, arr2(&[[2, 2, 2], [3, 3, 3], [4, 4, 4]])); /// assert_eq!(b1, arr2(&[[5, 6, 7], [5, 6, 7], [5, 6, 7]])); /// ``` - pub fn broadcast_with<'a, 'b, B, S2, E>(&'a self, other: &'b ArrayBase) -> + pub(crate) fn broadcast_with<'a, 'b, B, S2, E>(&'a self, other: &'b ArrayBase) -> Result<(ArrayView<'a, A, >::Output>, ArrayView<'b, B, >::Output>), ShapeError> where S: Data,