Skip to content

Generalize Array interface to behave like a table #41

Open
@bgroenks96

Description

@bgroenks96

It's kind of weird that AbstractModel implements a Table interface but the Array interface (size, length, getindex, setindex, etc) behaves a like a vector of Params.

It would be really useful for AbstractModel to live up to its aspirations to be a real Table and allow itself to be indexed as such.

This has the potential to address #21 and #34 since it would allow for things like:

m = Model(obj)
m[.!m[:isconstant], :val] .= values

i.e. permitting both row and column indexing.

I will take a crack at it and submit a PR since this would solve a problem I am facing at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions