Doc for eltype(A)[A[k] for k in v]?


#1

I have seen the use of eltype(A)[A[k] for k in v] a few times in a package. Not seeing the doc for this syntax here. But I know that I must have missed looking at somewhere else. Can anyone remind me? Thanks!


#2

http://docs.julialang.org/en/stable/manual/arrays/?highlight=comprehensions#comprehensions

That syntax is shown at the end of that section, except that it uses a specific type instead of eltype.


#3

Aha, thanks buddy!