Mercurial > repos > public > sbplib_julia
comparison src/Grids/grid.jl @ 1342:c0c1189c5f2e refactor/grids
Clean up grid_refactor.md
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Fri, 12 May 2023 15:50:09 +0200 |
| parents | f265799bc2b6 |
| children | fa3695f634de |
comparison
equal
deleted
inserted
replaced
| 1341:5761f4060f2b | 1342:c0c1189c5f2e |
|---|---|
| 90 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]), size(g)) | 90 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]), size(g)) |
| 91 else | 91 else |
| 92 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]...), size(g)) | 92 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]...), size(g)) |
| 93 end | 93 end |
| 94 end | 94 end |
| 95 # TBD: How does `eval_on` relate to `map`. Should the be closer in name? | |
| 96 | 95 |
| 97 _ncomponents(::Type{<:Number}) = 1 | 96 _ncomponents(::Type{<:Number}) = 1 |
| 98 _ncomponents(T::Type{<:SVector}) = length(T) | 97 _ncomponents(T::Type{<:SVector}) = length(T) |
