Skip to content

Commit e1f491f

Browse files
authored
remove unbound type parameters (#516)
I didn't check, but unbound type parameters often cause performance issues, so this may not be merely cosmetic.
1 parent 006a0a5 commit e1f491f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Interpolations.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,10 @@ end
407407
@inline checkbounds(::Type{Bool}, itp::AbstractInterpolation, x::Vararg{ExpandedIndexTypes,N}) where N =
408408
_checkbounds(BoundsCheckStyle(itp), itp, x)
409409

410-
@inline checkbounds(::Type{Bool}, itp::AbstractInterpolation, x::LogicalIndex) where N =
410+
@inline checkbounds(::Type{Bool}, itp::AbstractInterpolation, x::LogicalIndex) =
411411
_checkbounds(BoundsCheckStyle(itp), itp, x)
412412

413-
@inline checkbounds(::Type{Bool}, itp::AbstractInterpolation, x::LogicalIndex{<:Any,<:AbstractArray{Bool,1}}) where N =
413+
@inline checkbounds(::Type{Bool}, itp::AbstractInterpolation, x::LogicalIndex{<:Any,<:AbstractArray{Bool,1}}) =
414414
_checkbounds(BoundsCheckStyle(itp), itp, x)
415415

416416
_checkbounds(::CheckWillPass, itp, x) = true

src/gridded/gridded.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ end
3434
3535
Construct a GriddedInterpolation for generic knots from an AbstractArray
3636
"""
37-
function GriddedInterpolation(::Type{TWeights}, knots::NTuple{N,GridIndex}, A::AbstractArray{Tel,N}, it::IT) where {N,Tel,TWeights<:Real,IT<:DimSpec{Gridded},pad}
37+
function GriddedInterpolation(::Type{TWeights}, knots::NTuple{N,GridIndex}, A::AbstractArray{Tel,N}, it::IT) where {N,Tel,TWeights<:Real,IT<:DimSpec{Gridded}}
3838
isconcretetype(IT) || error("The b-spline type must be a leaf type (was $IT)")
3939

4040
check_gridded(it, knots, axes(A))
@@ -57,7 +57,7 @@ end
5757
5858
AbstractUnitRanges are collected to an Array to not confuse bound calculations (See Issue #398)
5959
"""
60-
function GriddedInterpolation(tw::Type{TWeights}, knots::NTuple{N,AbstractUnitRange}, A::AbstractArray{TCoefs,N}, it::IT) where {N,TCoefs,TWeights<:Real,IT<:DimSpec{Gridded},pad}
60+
function GriddedInterpolation(tw::Type{TWeights}, knots::NTuple{N,AbstractUnitRange}, A::AbstractArray{TCoefs,N}, it::IT) where {N,TCoefs,TWeights<:Real,IT<:DimSpec{Gridded}}
6161
# Fix Issue 398: Ensure that gridded_*bounds is used by converting
6262
# AbstractUnitRange to a non-AbstractUnitRange AbstractVector
6363
GriddedInterpolation(tw, collect.(knots), A, it)

0 commit comments

Comments
 (0)