Skip to content

Commit 85649d1

Browse files
authored
use assertinteger (#156)
1 parent 6e65adb commit 85649d1

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1919
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2020

2121
[compat]
22-
ApproxFunBase = "0.7.40"
22+
ApproxFunBase = "0.7.43"
2323
ApproxFunBaseTest = "0.1"
2424
Aqua = "0.5"
2525
BandedMatrices = "0.16, 0.17"

src/ApproxFunOrthogonalPolynomials.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ import ApproxFunBase: Fun, SubSpace, WeightSpace, NoSpace, HeavisideSpace,
4040
components, promoterangespace,
4141
block, blockstart, blockstop, blocklengths, isblockbanded,
4242
pointscompatible, affine_setdiff, complexroots,
43-
ℓ⁰, recα, recβ, recγ, ℵ₀, ∞, RectDomain
43+
ℓ⁰, recα, recβ, recγ, ℵ₀, ∞, RectDomain,
44+
assert_integer
4445

4546
import DomainSets: Domain, indomain, UnionDomain, FullSpace, Point,
4647
Interval, ChebyshevInterval, boundary, rightendpoint, leftendpoint,

src/Spaces/Chebyshev/ChebyshevOperators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ end
215215
## Derivative
216216

217217
function Derivative(sp::Chebyshev{DD},order::Number) where {DD<:IntervalOrSegment}
218-
@assert Integer(order) == order "order must be an integer"
218+
assert_integer(order)
219219
ConcreteDerivative(sp,order)
220220
end
221221

src/Spaces/Hermite/Hermite.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Fun(::typeof(identity), sp::GaussWeight) = Fun(identity, sp.space)
8888
spacescompatible(a::GaussWeight,b::GaussWeight)=spacescompatible(a.space,b.space)&&isapprox(a.L,b.L)
8989

9090
function Derivative(sp::GaussWeight,k::Number)
91-
@assert Integer(k) == k "order must be an integer"
91+
assert_integer(k)
9292
if k == 1
9393
x = Multiplication(Fun(identity,sp.space),sp.space)
9494
D = Derivative(sp.space)

src/Spaces/Jacobi/JacobiOperators.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Derivative
22

33
function Derivative(J::Jacobi,k::Number)
4-
@assert Integer(k) == k "order must be an integer"
4+
assert_integer(k)
55
k==1 ? ConcreteDerivative(J,1) :
66
DerivativeWrapper(
77
TimesOperator(
@@ -35,7 +35,7 @@ Evaluation(S::NormalizedPolynomialSpace{<:Jacobi},x::Number,o::Integer) = Concre
3535
## Integral
3636

3737
function Integral(J::Jacobi,k::Number)
38-
@assert Integer(k) == k "order must be an integer"
38+
assert_integer(k)
3939
if k > 1
4040
Q=Integral(J,1)
4141
IntegralWrapper(TimesOperator(Integral(rangespace(Q),k-1),Q),J,k)

src/Spaces/Ultraspherical/UltrasphericalOperators.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ end
5555

5656

5757
function Derivative(sp::Ultraspherical{LT,DD}, m::Number) where {LT,DD<:IntervalOrSegment}
58-
@assert Integer(m) == m "order must be an integer"
58+
assert_integer(m)
5959
ConcreteDerivative(sp,m)
6060
end
6161
function Integral(sp::Ultraspherical{LT,DD}, m::Number) where {LT,DD<:IntervalOrSegment}
62-
@assert Integer(m) == m "order must be an integer"
62+
assert_integer(m)
6363
λ = order(sp)
6464
if m λ
6565
ConcreteIntegral(sp,m)

0 commit comments

Comments
 (0)