Skip to content

Commit 1648ffd

Browse files
authored
Accept callables in Fun constructor (#98)
1 parent 6d33009 commit 1648ffd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
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.5.7"
3+
version = "0.5.8"
44

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

src/constructors.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ Fun(f::Fun,::Type{T}) where {T<:Space} = Fun(f,T(domain(f)))
8080

8181

8282
Fun(f,T::Type) = Fun(dynamic(f),T())
83-
Fun(f::Function,T::Type,n::Integer) = Fun(dynamic(f),T(),n)
83+
Fun(f,T::Type,n::Integer) = Fun(dynamic(f),T(),n)
8484

8585
Fun(f::AbstractVector,d::Domain) = Fun(f,Space(d))
8686
Fun(d::Domain,f::AbstractVector{T}) where {T<:Number} = Fun(Space(d),f)
8787
Fun(d::Domain,f::AbstractVector) = Fun(Space(d),f)
8888

8989

90-
Fun(f::Function,d::Domain,n) = Fun(dynamic(f),Space(d),n)
90+
Fun(f,d::Domain,n) = Fun(dynamic(f),Space(d),n)
9191

9292

9393
# We do zero special since zero exists even when one doesn't
@@ -170,11 +170,11 @@ Fun(f::typeof(zero), d::Space) = zeros(eltype(domain(d)),d)
170170
Fun(f::typeof(one), d::Space) = ones(eltype(domain(d)),d)
171171

172172
Fun(f::Type, d::Domain) = Fun(f,Space(d))
173-
Fun(f::Function, d::Domain) = Fun(f,Space(d))
173+
Fun(f, d::Domain) = Fun(f,Space(d))
174174

175175

176176
# this is the main constructor
177-
Fun(f::Function, d::Space) = default_Fun(dynamic(f), d)
177+
Fun(f, d::Space) = default_Fun(dynamic(f), d)
178178

179179
# this supports expanding a Fun to a larger or smaller domain.
180180
# we take the union and then intersection to get at any singularities

0 commit comments

Comments
 (0)