Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
bump version (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
findmyway authored Sep 1, 2020
1 parent 8755c13 commit dc0e237
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ReinforcementLearningBase"
uuid = "e575027e-6cd6-5018-9292-cdc6200d2b44"
authors = ["Johanni Brea <[email protected]>", "Jun Tian <[email protected]>"]
version = "0.8.1"
version = "0.8.2"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
1 change: 1 addition & 0 deletions src/implementations/spaces/discrete_space.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Base.convert(
) = DiscreteSpace(s)

Base.iterate(s::DiscreteSpace, args...) = iterate(s.span, args...)
Base.getindex(s::DiscreteSpace, args...) = getindex(s.span, args...)

#####
# ActionWithProb
Expand Down
13 changes: 13 additions & 0 deletions src/implementations/spaces/vect_space.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,16 @@ Base.eltype(s::VectSpace) = Vector{eltype(s.data[1])}
Base.in(xs, s::VectSpace) =
length(xs) == length(s.data) && all(x in d for (x, d) in zip(xs, s.data))
Random.rand(rng::AbstractRNG, s::VectSpace) = [rand(rng, d) for d in s.data]

Base.iterate(s::VectSpace, args...) = iterate(s.data, args...)
Base.getindex(s::VectSpace, i::Int) = getindex(s.data, i)

"""
getindex(s::VectSpace, I::Vector{Int})
Here `I` represents the index of action in each inner space inside `s`.
"""
function Base.getindex(s::VectSpace, I::Vector{Int})
@assert length(s.data) == length(I)
[getindex(d, i) for (d, i) in zip(s.data, I)]
end

2 comments on commit dc0e237

@findmyway
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/20623

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.2 -m "<description of version>" dc0e237b347fc9d25197bbae6768760cc57c801e
git push origin v0.8.2

Please sign in to comment.