Mercurial > repos > public > sbplib_julia
comparison src/LazyTensors/tuple_manipulation.jl @ 1215:07c213167f7c feature/dissipation_operators
Fix typos in docstrings
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 07 Feb 2023 21:40:42 +0100 |
| parents | 672610322206 |
| children | 5bfb182e24dc |
comparison
equal
deleted
inserted
replaced
| 1212:d60a10ad6579 | 1215:07c213167f7c |
|---|---|
| 76 flatten_tuple(ts::Vararg) = flatten_tuple(ts) | 76 flatten_tuple(ts::Vararg) = flatten_tuple(ts) |
| 77 | 77 |
| 78 """ | 78 """ |
| 79 left_pad_tuple(t, val, N) | 79 left_pad_tuple(t, val, N) |
| 80 | 80 |
| 81 Left pad the `t` to length `N` using the value `val`. | 81 Left pad the tuple `t` to length `N` using the value `val`. |
| 82 """ | 82 """ |
| 83 function left_pad_tuple(t, val, N) | 83 function left_pad_tuple(t, val, N) |
| 84 if N < length(t) | 84 if N < length(t) |
| 85 throw(DomainError(N, "Can't pad tuple of length $(length(t)) to $N elements")) | 85 throw(DomainError(N, "Can't pad tuple of length $(length(t)) to $N elements")) |
| 86 end | 86 end |
| 90 end | 90 end |
| 91 | 91 |
| 92 """ | 92 """ |
| 93 right_pad_tuple(t, val, N) | 93 right_pad_tuple(t, val, N) |
| 94 | 94 |
| 95 Right pad the `t` to length `N` using the value `val`. | 95 Right pad the tuple `t` to length `N` using the value `val`. |
| 96 """ | 96 """ |
| 97 function right_pad_tuple(t, val, N) | 97 function right_pad_tuple(t, val, N) |
| 98 if N < length(t) | 98 if N < length(t) |
| 99 throw(DomainError(N, "Can't pad tuple of length $(length(t)) to $N elements")) | 99 throw(DomainError(N, "Can't pad tuple of length $(length(t)) to $N elements")) |
| 100 end | 100 end |
