Skip to content

Commit 715ddd4

Browse files
committed
Deprecate bitbroadcast
1 parent 242de06 commit 715ddd4

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

base/broadcast.jl

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ using Base: promote_eltype_op, linearindices, tail, OneTo, to_shape,
77
_msk_end, unsafe_bitgetindex, bitcache_chunks, bitcache_size, dumpbitcache,
88
nullable_returntype, null_safe_eltype_op, hasvalue, is_nullable_array
99
import Base: broadcast, broadcast!
10-
export bitbroadcast, dotview
11-
export broadcast_getindex, broadcast_setindex!
10+
export broadcast_getindex, broadcast_setindex!, dotview
1211

1312
## Broadcasting utilities ##
1413

@@ -464,24 +463,6 @@ julia> Ref(7) .+ Nullable(3)
464463
"""
465464
@inline broadcast(f, A, Bs...) = broadcast_c(f, containertype(A, Bs...), A, Bs...)
466465

467-
"""
468-
bitbroadcast(f, As...)
469-
470-
Like [`broadcast`](@ref), but allocates a `BitArray` to store the
471-
result, rather then an `Array`.
472-
473-
```jldoctest
474-
julia> bitbroadcast(isodd,[1,2,3,4,5])
475-
5-element BitArray{1}:
476-
true
477-
false
478-
true
479-
false
480-
true
481-
```
482-
"""
483-
@inline bitbroadcast(f, As...) = broadcast!(f, similar(BitArray, broadcast_indices(As...)), As...)
484-
485466
"""
486467
broadcast_getindex(A, inds...)
487468

base/deprecated.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,4 +1224,7 @@ function quadgk(args...)
12241224
end
12251225
export quadgk
12261226

1227+
# Broadcast now returns a BitArray when the resulting eltype is Bool (#17623)
1228+
@deprecate bitbroadcast(f, As...) broadcast(f, As...)
1229+
12271230
# End deprecations scheduled for 0.6

test/bitarray.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,8 +1138,8 @@ let b1 = trues(v1), b2 = falses(v1)
11381138
end
11391139
end
11401140

1141-
let odds = bitbroadcast(isodd, 1:2000)
1142-
evens = bitbroadcast(iseven, 1:2000)
1141+
let odds = broadcast(isodd, 1:2000)
1142+
evens = broadcast(iseven, 1:2000)
11431143
for i = 1:2:2000
11441144
@test findprev(odds,i) == findprevnot(evens,i) == i
11451145
@test findnext(odds,i) == findnextnot(evens,i) == i

0 commit comments

Comments
 (0)