I have an array
a = zeros(2,3)
2×3 Matrix{Float64}:
0.0 0.0 0.0
0.0 0.0 0.0
and I want to create a Bool array of same size with all values set to false.
Another option is to use zeros with Bool as the type option:
julia> zeros(Bool, size(a))
2×3 Matrix{Bool}:
0 0 0
0 0 0
One solution would be:
size(a) |> falses
2×3 BitMatrix:
0 0 0
0 0 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With