You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
Activity
inducer commentedon Aug 25, 2021
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?)alexfikl commentedon Aug 25, 2021
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 tocl.array.Array(or equivalentpytatoclasses), so it should stand in for any of those.It probably deserves a better name, so 👍 from my side as well.
majosm commentedon Aug 25, 2021
I don't think I've seen one; it's mainly just the name/documentation that made me wonder. I do like
ArrayOrContainerT.