Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/readoperator.jl @ 791:7669c1e3a9a4 operator_storage_array_of_table
Fix typos
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 22 Jul 2021 10:14:04 +0200 |
parents | f6e56d5dbc17 |
children | 26bf5b2b3e32 |
comparison
equal
deleted
inserted
replaced
790:db1af48a5653 | 791:7669c1e3a9a4 |
---|---|
7 export parse_rational | 7 export parse_rational |
8 | 8 |
9 # The read_stencil_set and get_stencil_set functions return the freshly parsed | 9 # The read_stencil_set and get_stencil_set functions return the freshly parsed |
10 # toml. The generic code in these functions can't be expected to know anyhting | 10 # toml. The generic code in these functions can't be expected to know anyhting |
11 # about how to read different stencil sets as they may contain many different | 11 # about how to read different stencil sets as they may contain many different |
12 # kinds of stecils. We should how ever add read_ and get_ functions for all | 12 # kinds of stencils. We should how ever add read_ and get_ functions for all |
13 # the types of stencils we know about. | 13 # the types of stencils we know about. |
14 # | 14 # |
15 # After getting a stencil set the user can use parse functions to parse what | 15 # After getting a stencil set the user can use parse functions to parse what |
16 # they want from the TOML dict. I.e no more "paths". | 16 # they want from the TOML dict. I.e no more "paths". |
17 # Functions needed: | 17 # Functions needed: |
76 return Stencil(weights..., center = toml["c"]) | 76 return Stencil(weights..., center = toml["c"]) |
77 end | 77 end |
78 | 78 |
79 function check_stencil_toml(toml) | 79 function check_stencil_toml(toml) |
80 if !(toml isa Dict || toml isa Vector{String}) | 80 if !(toml isa Dict || toml isa Vector{String}) |
81 throw(ArgumentError("the TOML for a stecil must be a vector of strings or a table.")) | 81 throw(ArgumentError("the TOML for a stencil must be a vector of strings or a table.")) |
82 end | 82 end |
83 | 83 |
84 if toml isa Vector{String} | 84 if toml isa Vector{String} |
85 return | 85 return |
86 end | 86 end |