Skip to content

Commit

Permalink
Merge pull request #48358 from adienes/master
Browse files Browse the repository at this point in the history
add docs for broadcast_shape
  • Loading branch information
kshyatt authored Jan 22, 2023
2 parents 7630606 + 13fe91c commit 9f93b31
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions base/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,20 @@ julia> Broadcast.combine_axes(1, 1, 1)
@inline combine_axes(A, B) = broadcast_shape(axes(A), axes(B))
combine_axes(A) = axes(A)

"""
broadcast_shape(As...) -> Tuple
Determine the result axes for broadcasting across all axes (size Tuples) in `As`.
```jldoctest
julia> Broadcast.broadcast_shape((1,2), (2,1))
(2, 2)
julia> Broadcast.broadcast_shape((1,), (1,5), (4,5,3))
(4, 5, 3)
```
"""
function broadcast_shape end
# shape (i.e., tuple-of-indices) inputs
broadcast_shape(shape::Tuple) = shape
broadcast_shape(shape::Tuple, shape1::Tuple, shapes::Tuple...) = broadcast_shape(_bcs(shape, shape1), shapes...)
Expand Down

4 comments on commit 9f93b31

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your package evaluation job has completed - possible new issues were detected.
A full report can be found here.

@vtjnash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

Please sign in to comment.