Skip to content

Support sampling into non-contiguous arrays #15

Description

@chriselrod

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions