Skip to content

Commit 8b0126c

Browse files
committed
rem Compat, eachslice to maplices + reshape
1 parent 60db7b0 commit 8b0126c

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ authors = ["Simon Byrne and various contributors"]
44
version = "0.6.8"
55

66
[deps]
7-
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
87
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
98
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
109
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
@@ -18,7 +17,6 @@ FFTW = "1"
1817
Interpolations = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15"
1918
StatsBase = "0.33, 0.34"
2019
julia = "1"
21-
Compat = "2.2.0, 4"
2220

2321
[extras]
2422
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

src/interp.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Compat: eachslice
21
import Interpolations: interpolate, scale
32

43

@@ -32,7 +31,7 @@ InterpKDE(kde::BivariateKDE) = InterpKDE(kde::BivariateKDE, BSpline(Quadratic(Li
3231
# any dimension
3332
pdf(ik::InterpKDE,x::Real...) = ik.itp(x...)
3433
pdf(ik::InterpKDE, V::AbstractVector) = ik.itp(V...)
35-
pdf(ik::InterpKDE, M::AbstractArray{<:Real, N}) where N = pdf.(ik,eachslice(M, dims=ntuple(i->i+1, N-1)) )
34+
pdf(ik::InterpKDE, M::AbstractArray{<:Real, N}) where N = reshape(mapslices(v->pdf(ik, v), M, dims = 1), size(M)[2:end])
3635

3736
# 1 dimension
3837
pdf(k::UnivariateKDE,x) = pdf(InterpKDE(k),x)

0 commit comments

Comments
 (0)