Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Commit 988e698

Browse files
🐛 namespace issues, same as it ever was
1 parent 1bd197f commit 988e698

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/SimpleSDMLayers.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ function __init__()
111111
@require MultivariateStats = "6f286f6a-111f-5878-ab1e-185364afe411" begin
112112
@info "Loading MultivariateStats support for SimpleSDMLayers.jl"
113113
include("integrations/MultivariateStats.jl")
114+
export transform
114115
end
115116

116117
end

src/integrations/MultivariateStats.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ end
2323
"""
2424
function transform(
2525
proj,
26-
layers::AbstractVecOrMat{U},
26+
layers::AbstractVecOrMat{U};
2727
kwargs...,
28-
) where {T<:Union{MultivariateStats.Whitening,MultivariateStats.PCA},U<:SimpleSDMLayer}
28+
) where {U<:SimpleSDMLayer}
2929
outdim = MultivariateStats.outdim(proj)
3030
newlayers = [similar(layers[begin]) for i = 1:outdim]
3131
common_keys = reduce(, keys.(layers))
@@ -40,3 +40,5 @@ function transform(
4040
end
4141
return newlayers
4242
end
43+
44+

test/extensions/multivariatestats.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ module SSLTestMVStats
88
TEST_AUTOCORRELATION = 0.9
99
TEST_NUM_LAYERS = 10
1010

11-
layers = [SimpleSDMPredictor(rand(MidpointDisplacement(TEST_AUTOCORRELATION), TEST_DIMS...)) for i in 1:TEST_NUM_LAYERS]
11+
layers = [SimpleSDMResponse(rand(MidpointDisplacement(TEST_AUTOCORRELATION), TEST_DIMS...)) for i in 1:TEST_NUM_LAYERS]
1212

1313

14-
@test typeof(transform(fit(PCA, layers),layers)) <: Vector{T} where T<:SimpleSDMLayer
15-
@test typeof(transform(fit(PPCA, layers),layers)) <: Vector{T} where T<:SimpleSDMLayer
14+
@test typeof(SimpleSDMLayers.transform(fit(PCA, layers),layers)) <: Vector{T} where T<:SimpleSDMLayer
15+
# @test typeof(transform(fit(PPCA, layers),layers)) <: Vector{T} where T<:SimpleSDMLayer
1616

1717

1818

0 commit comments

Comments
 (0)