-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
enhancementNew feature or requestNew feature or request
Description
For Julia arrays, users can do things like:
julia> A = rand(3,3)
3×3 Matrix{Float64}:
0.628506 0.704686 0.205372
0.390219 0.192054 0.118027
0.27103 0.0604534 0.297599
julia> A[A .> 0.5] .= 1
2-element view(::Vector{Float64}, [1, 4]) with eltype Float64:
1.0
1.0
julia> A
3×3 Matrix{Float64}:
1.0 1.0 0.205372
0.390219 0.192054 0.118027
0.27103 0.0604534 0.297599It would be really convenient for users if we could somehow support this with DataLayouts, specifically for AbstractData{Bool} fields.
This may be a bit a bit of work to support getindex and setindex!, since setindex! will require some sort of lazy view, containing the indices, but I think it's possible in principle.
This might be a nice complement to the space masks.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request