diff --git a/ext/IntegralsFastGaussQuadratureExt.jl b/ext/IntegralsFastGaussQuadratureExt.jl index 54058525..bb08952c 100644 --- a/ext/IntegralsFastGaussQuadratureExt.jl +++ b/ext/IntegralsFastGaussQuadratureExt.jl @@ -1,13 +1,8 @@ module IntegralsFastGaussQuadratureExt using Integrals -if isdefined(Base, :get_extension) - import FastGaussQuadrature - import FastGaussQuadrature: gausslegendre - # and eventually gausschebyshev, etc. -else - import ..FastGaussQuadrature - import ..FastGaussQuadrature: gausslegendre -end +import FastGaussQuadrature +import FastGaussQuadrature: gausslegendre + using LinearAlgebra Integrals.gausslegendre(n) = FastGaussQuadrature.gausslegendre(n) diff --git a/ext/IntegralsForwardDiffExt.jl b/ext/IntegralsForwardDiffExt.jl index f09309cf..1775048e 100644 --- a/ext/IntegralsForwardDiffExt.jl +++ b/ext/IntegralsForwardDiffExt.jl @@ -1,6 +1,6 @@ module IntegralsForwardDiffExt using Integrals -isdefined(Base, :get_extension) ? (using ForwardDiff) : (using ..ForwardDiff) +using ForwardDiff ### Forward-Mode AD Intercepts function Integrals._evaluate!(f, y, u, diff --git a/ext/IntegralsZygoteExt.jl b/ext/IntegralsZygoteExt.jl index ea4c55b9..a6b270ef 100644 --- a/ext/IntegralsZygoteExt.jl +++ b/ext/IntegralsZygoteExt.jl @@ -1,15 +1,10 @@ module IntegralsZygoteExt using LinearAlgebra: dot using Integrals -if isdefined(Base, :get_extension) - using Zygote - import ChainRulesCore - import ChainRulesCore: Tangent, NoTangent, ProjectTo -else - using ..Zygote - import ..Zygote.ChainRulesCore - import ..Zygote.ChainRulesCore: Tangent, NoTangent, ProjectTo -end +using Zygote +import ChainRulesCore +import ChainRulesCore: Tangent, NoTangent, ProjectTo + ChainRulesCore.@non_differentiable Integrals.checkkwargs(kwargs...) ChainRulesCore.@non_differentiable Integrals.isinplace(f, args...) # fixes #99 ChainRulesCore.@non_differentiable Integrals.init_cacheval(alg, prob) diff --git a/src/Integrals.jl b/src/Integrals.jl index 4ea9e5c5..d49e065a 100644 --- a/src/Integrals.jl +++ b/src/Integrals.jl @@ -1,9 +1,5 @@ module Integrals -if !isdefined(Base, :get_extension) - using Requires -end - using Reexport, MonteCarloIntegration, QuadGK, HCubature @reexport using SciMLBase using LinearAlgebra