Skip to content

bug in setindex! for subarray #4383

Closed
Closed
@Jutho

Description

@Jutho

I suppose the following should work

A=randn(3,3,3)
As=slice(A,:,1,:)
As[:,:]=randn(3,3)

It gives however an error, apparently because the index translation that happens in the subarray setindex! method does not reshape the 3x3 matrix into a 3x1x3 array.

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