Skip to content

Commit d02dfcb

Browse files
authored
Merge pull request #64 from JuliaDiffEq/myb/fun
ApproxFun aware `recursive_*`
2 parents 994808f + 481352a commit d02dfcb

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

src/RecursiveArrayTools.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module RecursiveArrayTools
1111
include("utils.jl")
1212
include("vector_of_array.jl")
1313
include("array_partition.jl")
14-
include("juno_rendering.jl")
14+
include("init.jl")
1515

1616
export VectorOfArray, DiffEqArray, AbstractVectorOfArray, AbstractDiffEqArray,
1717
vecarr_to_arr, vecarr_to_vectors, tuples
@@ -22,4 +22,5 @@ module RecursiveArrayTools
2222

2323
export ArrayPartition
2424

25+
2526
end # module

src/init.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function __init__()
2+
@require Juno="e5e0dc1b-0480-54bc-9374-aad01c23163d" begin
3+
# Juno Rendering
4+
Juno.render(i::Juno.Inline, x::ArrayPartition) = Juno.render(i, Juno.defaultrepr(x))
5+
Juno.render(i::Juno.Inline, x::AbstractVectorOfArray) = Juno.render(i, Juno.defaultrepr(x))
6+
end
7+
8+
@require ApproxFun="28f2ccd6-bb30-5033-b560-165f7b14dc2f" begin
9+
RecursiveArrayTools.recursive_unitless_eltype(a::ApproxFun.Fun) = typeof(a)
10+
RecursiveArrayTools.recursive_unitless_bottom_eltype(a::ApproxFun.Fun) = recursive_unitless_bottom_eltype(ApproxFun.coefficients(a))
11+
RecursiveArrayTools.recursive_bottom_eltype(a::ApproxFun.Fun) = recursive_bottom_eltype(ApproxFun.coefficients(a))
12+
end
13+
end

src/juno_rendering.jl

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)