As Tim says, you just want similar(a, eltype(b), 5) 

On Wednesday, April 22, 2015 at 6:22:49 AM UTC-4, Mauro wrote:
>
> A generated function works:


(I'm starting to be very suspicious of every time someone suggests using a 
generated/staged function. It's too easy to turn this into a crutch; it's 
not a feature that should really come up in everyday usage.)

Reply via email to