Skip to content

Commit 9f8909e

Browse files
committed
Modify the docs and visibility of broadcast_with
1 parent 6c40d61 commit 9f8909e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/impl_methods.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,8 @@ where
17071707
unsafe { Some(ArrayView::new(self.ptr, dim, broadcast_strides)) }
17081708
}
17091709

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.
17111712
///
17121713
/// Return `ShapeError` if their shapes can not be broadcast together.
17131714
///
@@ -1720,7 +1721,7 @@ where
17201721
/// assert_eq!(a1, arr2(&[[2, 2, 2], [3, 3, 3], [4, 4, 4]]));
17211722
/// assert_eq!(b1, arr2(&[[5, 6, 7], [5, 6, 7], [5, 6, 7]]));
17221723
/// ```
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>) ->
17241725
Result<(ArrayView<'a, A, <D as BroadcastShape<E>>::Output>, ArrayView<'b, B, <D as BroadcastShape<E>>::Output>), ShapeError>
17251726
where
17261727
S: Data<Elem=A>,

0 commit comments

Comments
 (0)