Skip to content

Commit 6591216

Browse files
committed
Merge pull request #16613 from JuliaLang/jb/dep_bcast_fun
deprecate `broadcast_function` and `broadcast!_function`
2 parents 0c23131 + d658e75 commit 6591216

File tree

5 files changed

+4
-36
lines changed

5 files changed

+4
-36
lines changed

base/broadcast.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Broadcast
55
using ..Cartesian
66
using Base: promote_op, promote_eltype, promote_eltype_op, @get!, _msk_end, unsafe_bitgetindex
77
import Base: .+, .-, .*, ./, .\, .//, .==, .<, .!=, .<=, , .%, .<<, .>>, .^
8-
export broadcast, broadcast!, broadcast_function, broadcast!_function, bitbroadcast
8+
export broadcast, broadcast!, bitbroadcast
99
export broadcast_getindex, broadcast_setindex!
1010

1111
## Broadcasting utilities ##
@@ -221,9 +221,6 @@ broadcast(f, As...) = broadcast!(f, Array{promote_eltype_op(f, As...)}(broadcast
221221

222222
bitbroadcast(f, As...) = broadcast!(f, BitArray(broadcast_shape(As...)), As...)
223223

224-
broadcast!_function(f) = (B, As...) -> broadcast!(f, B, As...)
225-
broadcast_function(f) = (As...) -> broadcast(f, As...)
226-
227224
broadcast_getindex(src::AbstractArray, I::AbstractArray...) = broadcast_getindex!(Array{eltype(src)}(broadcast_shape(I...)), src, I...)
228225
@generated function broadcast_getindex!(dest::AbstractArray, src::AbstractArray, I::AbstractArray...)
229226
N = length(I)

base/deprecated.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,9 @@ end
12731273
@deprecate print_unescaped unescape_string
12741274
@deprecate print_joined join
12751275

1276+
@deprecate broadcast!_function(f) (B, As...) -> broadcast!(f, B, As...)
1277+
@deprecate broadcast_function(f) (As...) -> broadcast(f, As...)
1278+
12761279
##### histogram #####
12771280

12781281
## nice-valued ranges for histograms

base/docs/helpdb/Base.jl

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3482,15 +3482,6 @@ not representable.
34823482
"""
34833483
trunc
34843484

3485-
"""
3486-
broadcast_function(f)
3487-
3488-
Returns a function `broadcast_f` such that
3489-
`broadcast_function(f)(As...) === broadcast(f, As...)`. Most useful in the form
3490-
`const broadcast_f = broadcast_function(f)`.
3491-
"""
3492-
broadcast_function
3493-
34943485
"""
34953486
unsafe_convert(T,x)
34963487
@@ -5625,15 +5616,6 @@ information.
56255616
"""
56265617
code_warntype
56275618

5628-
"""
5629-
```
5630-
broadcast!_function(f)
5631-
```
5632-
5633-
Like `broadcast_function`, but for `broadcast!`.
5634-
"""
5635-
broadcast!_function
5636-
56375619
"""
56385620
setrounding(T, mode)
56395621

base/exports.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,7 @@ export
486486
# arrays
487487
bitbroadcast,
488488
broadcast!,
489-
broadcast!_function,
490489
broadcast,
491-
broadcast_function,
492490
broadcast_getindex,
493491
broadcast_setindex!,
494492
cat,

doc/stdlib/arrays.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -316,18 +316,6 @@ All mathematical operations and functions are supported for arrays
316316
317317
Like ``broadcast``\ , but allocates a ``BitArray`` to store the result, rather then an ``Array``\ .
318318

319-
.. function:: broadcast_function(f)
320-
321-
.. Docstring generated from Julia source
322-
323-
Returns a function ``broadcast_f`` such that ``broadcast_function(f)(As...) === broadcast(f, As...)``\ . Most useful in the form ``const broadcast_f = broadcast_function(f)``\ .
324-
325-
.. function:: broadcast!_function(f)
326-
327-
.. Docstring generated from Julia source
328-
329-
Like ``broadcast_function``\ , but for ``broadcast!``\ .
330-
331319
Indexing, Assignment, and Concatenation
332320
---------------------------------------
333321

0 commit comments

Comments
 (0)