Skip to content

Problems with subarray indexing for >2-dimensional arrays. #2844

Closed
@mschauer

Description

@mschauer

This works as expected

a = randn(3,4)
x = sub(a, 1:size(a,1), 4)
x[1:3] = 1.
a

this not

a = randn(3,4,5)
x = sub(a, 1:size(a,1), 1:size(a,2), 5)
x[1:3, 1:4] = 1.
 ERROR: BoundsError()
 in translate_indexes at subarray.jl:205
 in setindex! at subarray.jl:304

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions