Skip to content

Commit

Permalink
Modify the docs and visibility of broadcast_with
Browse files Browse the repository at this point in the history
  • Loading branch information
SparrowLii committed Feb 19, 2021
1 parent 6c40d61 commit 9f8909e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/impl_methods.rs
Expand Up @@ -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.
///
Expand All @@ -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<S2, E>) ->
pub(crate) fn broadcast_with<'a, 'b, B, S2, E>(&'a self, other: &'b ArrayBase<S2, E>) ->
Result<(ArrayView<'a, A, <D as BroadcastShape<E>>::Output>, ArrayView<'b, B, <D as BroadcastShape<E>>::Output>), ShapeError>
where
S: Data<Elem=A>,
Expand Down

0 comments on commit 9f8909e

Please sign in to comment.