My previous change which used TypeVar for coordinate types 1 was actually a Bad Idea. While it was better in that it prohibited heterogeneous collections and slices, it was worse in that made the SparseDFCoord type (and derived types) into generic types, which we do not want.
The right way to avoid repeating all the possible types is to make a union of the possible containers, and then specify that with all the possible contents that may go into those containers.
My previous change which used TypeVar for coordinate types 1 was actually a Bad Idea. While it was better in that it prohibited heterogeneous collections and slices, it was worse in that made the SparseDFCoord type (and derived types) into generic types, which we do not want.
The right way to avoid repeating all the possible types is to make a union of the possible containers, and then specify that with all the possible contents that may go into those containers.