Strided.jl
Strided.jl copied to clipboard
support for BitArray?
Any chance this package could support the BitArray type? Not sure how much work that would represent considering BitArray is a bit special.
Currently any operation working on a BitArray or returning a BitArray seems to result in the following error:
ERROR: MethodError: no method matching StridedView(::BitArray{1})
E.g.
julia> a=[1,2]
2-element Array{Int64,1}:
1
2
julia> b=BitArray([true,false])
2-element BitArray{1}:
1
0
julia> a .+ b
2-element Array{Int64,1}:
2
2
julia> @strided a .+ b
ERROR: MethodError: no method matching StridedView(::BitArray{1})
or
julia> a .< a
2-element BitArray{1}:
0
0
julia> @strided a .< a
ERROR: MethodError: no method matching StridedView(::BitArray{1})
My apologies for apparently never responding to this. This is indeed nontrivial, I would have to learn about the internals of BitArray and even then it is not clear that all the logic behind this package can trivially be generalised to that case.
Thank you for taking the time to answer it after all these months (we all forget stuff sometimes). On topic, it would be a nice functionality to add but I understand that it is far from easy.