Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now there is a single List type that can represent different things. It represents Python lists (potentially nested), but also numpy arrays (which don't always behave like list, for instance + doesn't concatenate, and truth value has a different meaning), and it's also the magic type for streaming and aggregating multiple connections (i.e. it is special to port depth).
This is an attempt to rework that. It introduces Array, which is the base class (basically replaces List), plus two subclasses, List (that now represents a Python list, a module declaring this port type can expect a proper Python list) and NumpyArray (for a numpy.ndarray).
This came up during my work on the interpreter and pandas.
It turned out to be complicated, because of all the code that checks for the List type (for depth magic). I'm also not sure whether List shouldn't completely be eliminated (though NumpyArray is definitely useful).