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

Type consistency #15

Closed
putianyi889 opened this issue Sep 6, 2021 · 3 comments
Closed

Type consistency #15

putianyi889 opened this issue Sep 6, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@putianyi889
Copy link
Contributor

Operations on CircularArrays give usual Arrays instead:

julia> CircularArray(rand(3,3)) .+ 1
3×3 Matrix{Float64}:
 1.59308  1.58855  1.67183
 1.86402  1.33325  1.31673
 1.15693  1.32027  1.24405
@Vexatos
Copy link
Owner

Vexatos commented Sep 7, 2021

This bug is specific to vectorized calls, thanks for reporting it. I already have a fix but I will need to wait a bit before pushing it to make sure it doesn't break interactions with other packages that I am currently testing.

For now, you should be able to use the map function to get around this issue.

julia> map(e -> e + 1, CircularArray(rand(3,3)))
3×3 CircularArray(::Matrix{Float64}):
 1.25159  1.76918  1.16795
 1.54877  1.81786  1.57196
 1.68487  1.82078  1.94709

@Vexatos Vexatos added the bug Something isn't working label Sep 7, 2021
@putianyi889
Copy link
Contributor Author

I'm just using CircularArray(A .+ 1) now. Thanks for reply.

@Vexatos Vexatos closed this as completed in 5fc8c0d Sep 7, 2021
@Vexatos
Copy link
Owner

Vexatos commented Sep 7, 2021

This will be fixed in the next version. Thanks again for reporting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants