Mercurial > repos > public > sbplib_julia
comparison src/LazyTensors/lazy_array.jl @ 1148:dd7325f91aa3
Merge bugfix/lazy_tensors/lazyfunctionarray
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 21 Oct 2022 21:41:43 +0200 |
parents | 6fd97b5ed3e5 |
children | c5cf32fab163 |
comparison
equal
deleted
inserted
replaced
1140:0aa8ce9f30e2 | 1148:dd7325f91aa3 |
---|---|
26 size::NTuple{D,Int} | 26 size::NTuple{D,Int} |
27 end | 27 end |
28 export LazyFunctionArray | 28 export LazyFunctionArray |
29 | 29 |
30 function LazyFunctionArray(f::F, size::NTuple{D,Int}) where {F<:Function,D} | 30 function LazyFunctionArray(f::F, size::NTuple{D,Int}) where {F<:Function,D} |
31 T = typeof(f(ones(D)...)) | 31 T = typeof(f(ones(Int, 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 |