-
Notifications
You must be signed in to change notification settings - Fork 28
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
How to materialize LazyArray #59
Comments
Is there a reason you can’t just call |
Output array can be sparse or structured. (So I guess |
We could add materialize(A::ApplyArray) = materialize(Applied(A))
materialize(A::BroadcastArray) = materialize(Broadcasted(A))
copy(A::ApplyArray) = copy(Applied(A))
copy(A::BroadcastArray) = copy(Broadcasted(A)) (I'll have to double check it doesn't break my |
This is just something that I notice while writing the test. If it can break your code, let's set the priority very low. |
QuasiArrays.jl has the function |
Currently there
materialize(LazyArray(lazy::Union{Applied, Broadcasted}))
seems to just pass-through aLazyArray
. This is why some tests here do not work:LazyArrays.jl/test/macrotests.jl
Lines 51 to 54 in b58b239
What is the canonical way to materialize a
LazyArray
? That is to say, what is the functionf
such thatf(LazyArray(lazy)) == materialize(lazy)
? Should it bematerialize
?collect
?copy
? something else?The text was updated successfully, but these errors were encountered: