Skip to content

Commit e634da5

Browse files
authored
accept numbers as integral orders (#223)
1 parent ce78a7c commit e634da5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Spaces/IntervalSpace.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ Fun(::typeof(identity), d::IntervalOrSegment{<:Number}) =
88
Fun(Chebyshev(d), [mean(d), complexlength(d)/2])
99

1010
# the default domain space is higher to avoid negative ultraspherical spaces
11-
Integral(d::IntervalOrSegment,n::Integer) = Integral(Ultraspherical(1,d), n)
11+
function Integral(d::IntervalOrSegment, n::Number)
12+
assert_integer(n)
13+
Integral(Ultraspherical(1,d), n)
14+
end

src/Spaces/Ultraspherical/UltrasphericalOperators.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ end
314314

315315

316316
# TODO: include in getindex to speed up
317-
function Integral(sp::Chebyshev{DD},m::Integer) where {DD<:IntervalOrSegment}
317+
function Integral(sp::Chebyshev{DD}, m::Number) where {DD<:IntervalOrSegment}
318+
assert_integer(m)
318319
usp = Ultraspherical(m,domain(sp))
319320
I = Integral(usp,m)
320321
C = Conversion(sp,usp)

0 commit comments

Comments
 (0)