Mercurial > repos > public > sbplib_julia
comparison src/Grids/grid.jl @ 1407:2ad518182b37 feature/grids/scalar_eval_on
Remove incorrect comment in documentation
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Tue, 22 Aug 2023 21:55:57 +0200 |
parents | efd992899896 |
children | 455e6b4c8b02 |
comparison
equal
deleted
inserted
replaced
1403:efd992899896 | 1407:2ad518182b37 |
---|---|
93 | 93 |
94 """ | 94 """ |
95 eval_on(g::Grid, f::Number) | 95 eval_on(g::Grid, f::Number) |
96 | 96 |
97 Lazy evaluation of a scalar `f` on the grid. | 97 Lazy evaluation of a scalar `f` on the grid. |
98 | |
99 For concrete array grid functions `map(f,g)` can be used instead. # REVIEW: The suggested code doesn't seem to work and I don't think it needs to. Probably enough to just delete the remark? | |
100 """ | 98 """ |
101 eval_on(g::Grid, f::Number) = return LazyTensors.LazyConstantArray(f, size(g)) | 99 eval_on(g::Grid, f::Number) = return LazyTensors.LazyConstantArray(f, size(g)) |
102 | 100 |
103 _ncomponents(::Type{<:Number}) = 1 | 101 _ncomponents(::Type{<:Number}) = 1 |
104 _ncomponents(T::Type{<:SVector}) = length(T) | 102 _ncomponents(T::Type{<:SVector}) = length(T) |