Skip to content

Commit 2fb12f0

Browse files
authored
Dedent text after function signature for docstrings
If stayed indented, Documenter.jl picks it all up as code sample and displays monospace. Moreover, the actual code sample/examples are not recognized.
1 parent c7e2d45 commit 2fb12f0

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

src/gridded/gridded.jl

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ end
3232
array::AbstractArray{Tel,N},
3333
interpolationType::DimSpec{<:Gridded})
3434
35-
Construct a GriddedInterpolation for generic knots from an AbstractArray
35+
Construct a GriddedInterpolation for generic knots from an AbstractArray
3636
"""
3737
function GriddedInterpolation(::Type{TWeights}, knots::NTuple{N,GridIndex}, A::AbstractArray{Tel,N}, it::IT) where {N,Tel,TWeights<:Real,IT<:DimSpec{Gridded}}
3838
isconcretetype(IT) || error("The b-spline type must be a leaf type (was $IT)")
@@ -53,9 +53,9 @@ end
5353
array::AbstractArray{TCoefs,N},
5454
interpolationType::DimSpec{<:Gridded})
5555
56-
Construct a GriddedInterpolation for generic knots from an AbstractUnitRange.
56+
Construct a GriddedInterpolation for generic knots from an AbstractUnitRange.
5757
58-
AbstractUnitRanges are collected to an Array to not confuse bound calculations (See Issue #398)
58+
AbstractUnitRanges are collected to an Array to not confuse bound calculations (See Issue #398)
5959
"""
6060
function GriddedInterpolation(tw::Type{TWeights}, knots::NTuple{N,AbstractUnitRange}, A::AbstractArray{TCoefs,N}, it::IT) where {N,TCoefs,TWeights<:Real,IT<:DimSpec{Gridded}}
6161
# Fix Issue 398: Ensure that gridded_*bounds is used by converting
@@ -88,35 +88,35 @@ degree(flag::Gridded) = flag.degree
8888
"""
8989
Interpolations.deduplicate_knots!(knots; move_knots = false)
9090
91-
Makes knots unique by incrementing repeated but otherwise sorted knots using `nextfloat`.
92-
If keyword `move_knots` is true, then `nextfloat` will be applied successively until knots
93-
are unique. Otherwise, a warning will be issued.
94-
95-
# Example
96-
97-
```jldoctest
98-
julia> knots = [-8.0, 0.0, 20.0, 20.0]
99-
4-element Vector{Float64}:
100-
-8.0
101-
0.0
102-
20.0
103-
20.0
104-
105-
julia> Interpolations.deduplicate_knots!(knots)
106-
4-element Vector{Float64}:
107-
-8.0
108-
0.0
109-
20.0
110-
20.000000000000004
111-
112-
julia> Interpolations.deduplicate_knots!([1.0, 1.0, 1.0, nextfloat(1.0), nextfloat(1.0)]; move_knots = true)
113-
5-element Vector{Float64}:
114-
1.0
115-
1.0000000000000002
116-
1.0000000000000004
117-
1.0000000000000007
118-
1.0000000000000009
119-
```
91+
Makes knots unique by incrementing repeated but otherwise sorted knots using `nextfloat`.
92+
If keyword `move_knots` is true, then `nextfloat` will be applied successively until knots
93+
are unique. Otherwise, a warning will be issued.
94+
95+
# Example
96+
97+
```jldoctest
98+
julia> knots = [-8.0, 0.0, 20.0, 20.0]
99+
4-element Vector{Float64}:
100+
-8.0
101+
0.0
102+
20.0
103+
20.0
104+
105+
julia> Interpolations.deduplicate_knots!(knots)
106+
4-element Vector{Float64}:
107+
-8.0
108+
0.0
109+
20.0
110+
20.000000000000004
111+
112+
julia> Interpolations.deduplicate_knots!([1.0, 1.0, 1.0, nextfloat(1.0), nextfloat(1.0)]; move_knots = true)
113+
5-element Vector{Float64}:
114+
1.0
115+
1.0000000000000002
116+
1.0000000000000004
117+
1.0000000000000007
118+
1.0000000000000009
119+
```
120120
"""
121121
function deduplicate_knots!(knots; move_knots::Bool = false)
122122
last_knot = first(knots)

0 commit comments

Comments
 (0)