Right now, in SubArrayHandler, a dimension is either kept as is, or removed completely, as otherwise a sub-dimension (i.e. with a subset of items) would be required.
However, it often seems quite handy, see for example the plots in example 2, or historic_years as a subset of years.
For this sub-dimension, we'd have to come up with a safe way to generate a dim_letter, such that einsum operations stay safe.
For example, we could enforce lower-case letters for original dimensions, and upper-case for subsets, but this would entail that two different subsets of the same dimension wouldn't be distinguishable.
A different way (quite radical) would be:
get rid of dim_letter altogether
always address dimensions by name, not by letter
for each np.einsum operation, create temporary index letters on the fly
Then we could append strings the the subset names, which uniquely specify the subset.
But getting rid of letters would make a lot of the notation quite bulky.
Right now, in SubArrayHandler, a dimension is either kept as is, or removed completely, as otherwise a sub-dimension (i.e. with a subset of items) would be required. However, it often seems quite handy, see for example the plots in example 2, or historic_years as a subset of years.
For this sub-dimension, we'd have to come up with a safe way to generate a dim_letter, such that einsum operations stay safe.
For example, we could enforce lower-case letters for original dimensions, and upper-case for subsets, but this would entail that two different subsets of the same dimension wouldn't be distinguishable.
A different way (quite radical) would be:
Then we could append strings the the subset names, which uniquely specify the subset. But getting rid of letters would make a lot of the notation quite bulky.