julia> a = bitrand(3,5)
3×5 BitArray{2}:
true false false true true
false true true true false
true true true true true
julia> Int.(a)
3×5 Array{Int64,2}:
1 0 0 1 1
0 1 1 1 0
1 1 1 1 1
julia> convert(Array{Int}, a)
3×5 Array{Int64,2}:
1 0 0 1 1
0 1 1 1 0
1 1 1 1 1
On Mon, Oct 17, 2016 at 2:55 AM, Sujoy Datta <[email protected]> wrote:
>
>
> I am a new user of Julia. Please help me to convert a nxm BitArray to an
> nxm IntegerArray.
> What I want is to print 1 for 'true' and 0 for 'false'.
> Thank you in advance.
>