Skip to content

Commit 54db897

Browse files
authored
Don't print docstrings explicitly to avoid breakages (JuliaApproximation#507)
* avoid printing intervals * Version bump to v0.8.44 * Fix show
1 parent 8e897ae commit 54db897

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.8.43"
3+
version = "0.8.44"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/Fun.jl

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@ Return the domain that `f` is defined on.
270270
```jldoctest
271271
julia> f = Fun(x->x^2);
272272
273-
julia> domain(f)
274-
-1.0..1.0 (Chebyshev)
273+
julia> domain(f) == ChebyshevInterval()
274+
true
275275
276276
julia> f = Fun(x->x^2, 0..1);
277277
278-
julia> domain(f)
279-
0..1
278+
julia> domain(f) == 0..1
279+
true
280280
```
281281
"""
282282
domain(f::Fun) = domain(f.space)
@@ -293,14 +293,21 @@ Return `f` projected onto `domain`.
293293
294294
# Examples
295295
```jldoctest
296-
julia> f = Fun(x->x^2)
297-
Fun(Chebyshev(), [0.5, 0.0, 0.5])
296+
julia> f = Fun(x->x^2);
297+
298+
julia> domain(f) == ChebyshevInterval()
299+
true
298300
299-
julia> setdomain(f, 0..1)
300-
Fun(Chebyshev(0..1), [0.5, 0.0, 0.5])
301+
julia> g = setdomain(f, 0..1);
302+
303+
julia> domain(g) == 0..1
304+
true
305+
306+
julia> coefficients(f) == coefficients(g)
307+
true
301308
```
302309
"""
303-
setdomain(f::Fun,d::Domain) = Fun(setdomain(space(f),d),f.coefficients)
310+
setdomain(f::Fun, d::Domain) = Fun(setdomain(space(f), d), f.coefficients)
304311

305312
for op in (:tocanonical,:tocanonicalD,:fromcanonical,:fromcanonicalD,:invfromcanonicalD)
306313
@eval $op(f::Fun,x...) = $op(space(f),x...)
@@ -385,10 +392,7 @@ Return an extrapolation of `f` from its domain to `x`.
385392
julia> f = Fun(x->x^2)
386393
Fun(Chebyshev(), [0.5, 0.0, 0.5])
387394
388-
julia> domain(f)
389-
-1.0..1.0 (Chebyshev)
390-
391-
julia> extrapolate(f, 2)
395+
julia> extrapolate(f, 2) # 2 lies outside the domain -1..1
392396
4.0
393397
```
394398
"""
@@ -422,6 +426,7 @@ values(f::Fun,dat...) = _values(f.space, f.coefficients, dat...)
422426
_values(sp, v, dat...) = itransform(sp, v, dat...)
423427
_values(sp::UnivariateSpace, v::Vector{T}, dat...) where {T<:Number} =
424428
itransform(sp, v, dat...)::Vector{float(T)}
429+
425430
"""
426431
points(f::Fun)
427432

test/show.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
@testset "Operator" begin
6565
@testset "QuotientSpace" begin
6666
Q = QuotientSpace(Dirichlet(ConstantSpace(0..1)))
67-
@test startswith(repr(Q), "ConstantSpace(0..1) /")
67+
@test startswith(repr(Q), "ConstantSpace($(0..1)) /")
6868
show(io, MIME"text/plain"(), Q)
6969
s = String(take!(io))
70-
@test startswith(s, "ConstantSpace(0..1) /")
70+
@test startswith(s, "ConstantSpace($(0..1)) /")
7171
end
7272
@testset "ConstantOperator" begin
7373
A = I : PointSpace(1:4)

0 commit comments

Comments
 (0)