Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for BitArray? #13

Open
kragol opened this issue Jun 26, 2020 · 2 comments
Open

support for BitArray? #13

kragol opened this issue Jun 26, 2020 · 2 comments

Comments

@kragol
Copy link

kragol commented Jun 26, 2020

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})
@Jutho
Copy link
Owner

Jutho commented Apr 20, 2022

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.

@kragol
Copy link
Author

kragol commented May 4, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants