Skip to content

Commit 8315002

Browse files
ljahnDatseris
andauthored
Fix FixedRectangularBinning for StateSpaceSet containing vectors (#435)
* Fix `FixedRectangularBinning` for `StateSpaceSet` containing vectors If a `StateSpaceSet` containing vectors is used to construct a `FixedRectangularBinning`, the element type `T` is determined as the vector type, not the underlying element type. Subsequent construction of a helper array for dealing with bounds therefore fails. Fixed by determining the type of the underlying elements. * bump version * update CI file --------- Co-authored-by: Datseris <[email protected]>
1 parent e835a07 commit 8315002

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
with:
3535
version: ${{ matrix.version }}
3636
arch: ${{ matrix.arch }}
37-
- uses: actions/cache@v1
37+
- uses: actions/cache@v4
3838
env:
3939
cache-name: cache-artifacts
4040
with:
@@ -45,6 +45,7 @@ jobs:
4545
${{ runner.os }}-test-
4646
${{ runner.os }}-
4747
- uses: julia-actions/julia-buildpkg@v1
48+
4849
- uses: julia-actions/julia-runtest@v1
4950
- uses: julia-actions/julia-processcoverage@v1
5051
- uses: codecov/codecov-action@v1

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 <[email protected]>, George Datseries <[email protected]>"
44
repo = "https://github.com/juliadynamics/ComplexityMeasures.jl.git"
5-
version = "3.8.0"
5+
version = "3.8.1"
66

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

src/encoding_implementations/rectangular_binning.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function RectangularBinEncoding(b::RectangularBinning, x)
157157
end
158158
function FixedRectangularBinning(b::RectangularBinning, x)
159159
D = dimension(x)
160-
T = eltype(x)
160+
T = eltype(eltype(x)) # elements might be in vectors
161161
ϵ = b.ϵ
162162
mini, maxi = minmaxima(x)
163163
if ϵ isa AbstractFloat || ϵ isa AbstractVector{<:AbstractFloat}

0 commit comments

Comments
 (0)