You can't append to 2d arrays. Create x like this:

x = falses(5)

and you should be good to go.

--Tim

On Thursday, December 31, 2015 10:48:57 AM Alexander Ranaldi wrote:
> How can I append to a BitArray?
> 
> julia> x = falses(5,1)
> 5x1 BitArray{2}:
>  false
>  false
>  false
>  false
>  false
> 
> 
> julia> push!(x,false)
> ERROR: MethodError: `push!` has no method matching push!(::BitArray{2}, ::
> Bool)
> Closest candidates are:
>   push!(::Any, ::Any, ::Any)
>   push!(::Any, ::Any, ::Any, ::Any...)
>   push!(::Array{Any,1}, ::ANY)
>   ...
> 
> Thanks

Reply via email to