Skip to content
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

_buffer_frame for Cartesian index #16

Merged
merged 3 commits into from
Aug 9, 2023
Merged

_buffer_frame for Cartesian index #16

merged 3 commits into from
Aug 9, 2023

Conversation

CasBex
Copy link
Contributor

@CasBex CasBex commented Aug 7, 2023

It is impossible to apply reduce and related functions over one dimension of multi-dimensional CircularArrayBuffers. Running the following code gives an error:

using CircularArrayBuffers

a = CircularArrayBuffer{Integer}(2, 3)
push!(a, [1, 2])
push!(a, [3, 4])

sum(a, dims=2)
reduce(+, a, dims=2) # both are equivalent

This merge request fixes that behavior.

@findmyway
Copy link
Member

Nice, would you mind adding a test case in the meanwhile?

@CasBex
Copy link
Contributor Author

CasBex commented Aug 8, 2023

I added a 2D and 3D test and noticed that it was still not quite working ok, hence 8aab70b. I think it should work now

@findmyway findmyway merged commit 1fb0f9c into JuliaReinforcementLearning:master Aug 9, 2023
@findmyway
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants