Skip to content

setindex not implemented #51

@daviehh

Description

@daviehh

Right now, one may read from the partition via .x[...], but not write:

using RecursiveArrayTools
u0=ArrayPartition(rand(2,2),rand(3,3),rand(4,4))
u0.x[1]=rand(2,2)

ERROR: MethodError: no method matching setindex!(::Tuple{Array{Float64,2},Array{Float64,2},Array{Float64,2}}, ::Array{Float64,2}, ::Int64)

For in-place updates f(du, u,p,t), it would be useful to be able to do the the assignment to du via the .x[...] index rather than the normal linear index.

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