-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
Some trivial information queries become time-consuming because currently there's no way to pass this extra information. And it just falls back to apply the function again and again and again and becomes very inefficient.
using TestImages, ImageTransformations
img = testimage("cameraman")
As = mappedarray(θ->imrotate(img, θ, axes(img)), -π/4:π/16:π/4);
@btime size.($As); # 22.033 ms (136 allocations: 2.26 MiB)
@btime collect($As); # 22.880 ms (127 allocations: 2.26 MiB)For this very specific case, axes can be known prior.