comparison src/LazyTensors/lazy_array.jl @ 372:33c360c3c6bc feature/lazy_function

Improve formatting
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 30 Sep 2020 21:07:34 +0200
parents 241bd2512c20
children f65809a26a17
comparison
equal deleted inserted replaced
371:241bd2512c20 372:33c360c3c6bc
31 T = typeof(f(ones(D)...)) 31 T = typeof(f(ones(D)...))
32 return LazyFunctionArray{F,T,D}(f,size) 32 return LazyFunctionArray{F,T,D}(f,size)
33 end 33 end
34 34
35 Base.size(lfa::LazyFunctionArray) = lfa.size 35 Base.size(lfa::LazyFunctionArray) = lfa.size
36
36 function Base.getindex(lfa::LazyFunctionArray{F,T,D}, I::Vararg{Int,D}) where {F,T,D} 37 function Base.getindex(lfa::LazyFunctionArray{F,T,D}, I::Vararg{Int,D}) where {F,T,D}
37 @boundscheck checkbounds(lfa, I...) 38 @boundscheck checkbounds(lfa, I...)
38 return lfa.f(I...) 39 return lfa.f(I...)
39 end 40 end
40 41