Skip to content

Meaning of ArrayContainerT #80

Closed

Description

@majosm

I'm a little unclear on whether ArrayContainerT is supposed to indicate an array container only, or if it represents either an array container or an underlying array. The documentation suggests (to me) the former, but it seems like it's being used more like the latter (for example in some of the mapping functions in container/traversal.py). Is there any consensus on what it should mean?

Activity

  1. inducer commented on Aug 25, 2021

    @inducer
    Owner

    I think it's "array or container" throughout. Do you have an example where only one or the other would work?

    At any rate, I wouldn't be opposed to renaming it ArrayOrContainerT. (with deprecation... probably?)

  2. alexfikl commented on Aug 25, 2021

    @alexfikl
    Collaborator

    I added that just for the benefit of typing annotations to parametrize generic functions with array-like things. Most things, e.g. rec_map_array_container, accept anything from very nested containers to cl.array.Array (or equivalent pytato classes), so it should stand in for any of those.

    It probably deserves a better name, so 👍 from my side as well.

  3. majosm commented on Aug 25, 2021

    @majosm
    CollaboratorAuthor

    I think it's "array or container" throughout. Do you have an example where only one or the other would work?

    At any rate, I wouldn't be opposed to renaming it ArrayOrContainerT.

    I don't think I've seen one; it's mainly just the name/documentation that made me wonder. I do like ArrayOrContainerT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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