Skip to content

Commit fc2d235

Browse files
committed
ApproxFun aware recursive_*
1 parent 994808f commit fc2d235

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/utils.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ recursive_unitless_eltype(a::Type{T}) where {T<:StaticArray} = similar_type(a,re
8888
recursive_unitless_eltype(a::Type{T}) where {T<:Array} = Array{recursive_unitless_eltype(eltype(a)),ndims(a)}
8989
recursive_unitless_eltype(a::Type{T}) where {T<:Number} = typeof(one(eltype(a)))
9090

91+
@require ApproxFun="28f2ccd6-bb30-5033-b560-165f7b14dc2f" begin
92+
RecursiveArrayTools.recursive_unitless_eltype(a::ApproxFun.Fun) = typeof(a)
93+
RecursiveArrayTools.recursive_unitless_bottom_eltype(a::ApproxFun.Fun) = recursive_unitless_bottom_eltype(ApproxFun.coefficients(a))
94+
RecursiveArrayTools.recursive_bottom_eltype(a::ApproxFun.Fun) = recursive_bottom_eltype(ApproxFun.coefficients(a))
95+
end
96+
9197
recursive_mean(x...) = mean(x...)
9298
function recursive_mean(vecvec::Vector{T}) where T<:AbstractArray
9399
out = zero(vecvec[1])

0 commit comments

Comments
 (0)