-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite-recursion bug in function is_discrete_space
when an object of type ClosedInterval is passed
#566
Comments
This is happening because there is no function is_discrete_space(x) = is_discrete_space(typeof(x)) # <- leads to infinite recursion when x isa ClosedInterval
is_discrete_space(::Type{<:AbstractVector}) = true
is_discrete_space(::Type{<:Tuple}) = true
is_discrete_space(::Type{<:NamedTuple}) = true
is_discrete_space(::Type{<:Space}) = false Adding the following code would solve the problem: using IntervalSets
is_discrete_space(::AbstractInterval) = false |
Or maybe we can simply set the default value to Like is_discrete_space(::Type) = false |
Yeah, whatever works. I like the simplicity/generality of your suggestion. |
findmyway
added a commit
to findmyway/ReinforcementLearning.jl
that referenced
this issue
Dec 25, 2021
harwiltz
pushed a commit
to harwiltz/ReinforcementLearning.jl
that referenced
this issue
Mar 1, 2022
* make bc gpu compatable * bump version * fix JuliaReinforcementLearning#566
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following simple code throws StackOverflowError:
The text was updated successfully, but these errors were encountered: