Mercurial > repos > public > sbplib_julia
comparison src/LazyTensors/lazy_array.jl @ 1142:6fd97b5ed3e5 bugfix/lazy_tensors/lazyfunctionarray
Fix failing test
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 19 Oct 2022 23:11:59 +0200 |
parents | c78c9a95024a |
children | c5cf32fab163 |
comparison
equal
deleted
inserted
replaced
1141:805fa2ba837f | 1142:6fd97b5ed3e5 |
---|---|
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 |