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

Support sampling into non-contiguous arrays #15

Open
chriselrod opened this issue Jul 5, 2021 · 0 comments
Open

Support sampling into non-contiguous arrays #15

chriselrod opened this issue Jul 5, 2021 · 0 comments

Comments

@chriselrod
Copy link
Member

This is currently silently broken, which is dangerous:

julia> randn!(local_rng(), view(X, :,2,:))
3×3 view(::Array{Float64, 3}, :, 2, :) with eltype Float64:
 -0.601185  0.0  0.0
  0.529745  0.0  0.0
 -1.30729   0.0  0.0

julia> X
3×3×3 Array{Float64, 3}:
[:, :, 1] =
 0.0  -0.601185  -0.662154
 0.0   0.529745   1.66186
 0.0  -1.30729    0.848472

[:, :, 2] =
  0.891294  0.0  0.0
  0.928313  0.0  0.0
 -1.01618   0.0  0.0

[:, :, 3] =
 0.0  0.0  0.0
 0.0  0.0  0.0
 0.0  0.0  0.0
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

No branches or pull requests

1 participant