Skip to content

Commit 7fd09b5

Browse files
authored
Fix ambiguous methods for codify (#431)
* Remove explicit methods for `codify` for `AbstractStateSpaceSet` * Up version
1 parent 87f97d6 commit 7fd09b5

File tree

5 files changed

+4
-13
lines changed

5 files changed

+4
-13
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "ComplexityMeasures"
22
uuid = "ab4b797d-85ee-42ba-b621-05d793b346a2"
33
authors = "Kristian Agasøster Haaga <kahaaga@gmail.com>, George Datseries <datseris.george@gmail.com>"
44
repo = "https://github.com/juliadynamics/ComplexityMeasures.jl.git"
5-
version = "3.7.2"
5+
version = "3.7.3"
66

77
[deps]
88
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"

src/core/encodings.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@ export codify
4949
"""
5050
5151
codify(o::OutcomeSpace, x::Vector) → s::Vector{Int}
52-
codify(o::OutcomeSpace, x::AbstractStateSpaceSet{D}) → s::NTuple{D, Vector{Int}
5352
5453
Codify `x` according to the outcome space `o`.
55-
If `x` is a `Vector`, then a `Vector{<:Integer}` is returned. If `x` is a
56-
`StateSpaceSet{D}`, then symbolization is done column-wise and an
57-
`NTuple{D, Vector{<:Integer}}` is returned, where `D = dimension(x)`.
5854
5955
## Description
6056
@@ -69,6 +65,4 @@ spaces preserve the input data length (e.g. [`UniqueElements`](@ref)), while
6965
some outcome spaces (e.g. [`OrdinalPatterns`](@ref)) do e.g. delay embeddings before
7066
encoding, so that `length(s) < length(x)`.
7167
"""
72-
function codify(o::OutcomeSpace, s::AbstractStateSpaceSet)
73-
return map(x -> codify(o, x), columns(s))
74-
end
68+
function codify(o::OutcomeSpace, x) end

src/outcome_spaces/ordinal_patterns.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ function fasthist!(πs::Vector{Int}, est::OrdinalOutcomeSpace{m}, x::AbstractSta
335335
return cts
336336
end
337337

338-
function codify(o::OrdinalOutcomeSpace{m}, x::AbstractVector{<:Real}) where {m}
338+
function codify(o::OrdinalOutcomeSpace{m}, x::AbstractVector) where {m}
339339
emb = embed(x, m, o.τ).data
340340
return encode.(Ref(o.encoding), emb)
341341
end

src/outcome_spaces/value_binning.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function codify(o::ValueBinning{<:FixedRectangularBinning}, x::AbstractStateSpac
9595
return encode.(Ref(encoder), x.data)
9696
end
9797

98-
function codify(o::ValueBinning{<:RectangularBinning}, x::AbstractVector{<:Real})
98+
function codify(o::ValueBinning{<:RectangularBinning}, x::AbstractVector)
9999
encoder = RectangularBinEncoding(o.binning, x)
100100
return encode.(Ref(encoder), x)
101101
end

test/outcome_spaces/implementations/permutation.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,4 @@ end
9595
s = StateSpaceSet(x, y)
9696
c1 = codify(S(), x)
9797
@test c1 isa Vector{Int}
98-
out = codify(S(), s)
99-
@test out isa Tuple
100-
@test out[1] == c1
10198
end

0 commit comments

Comments
 (0)