There is something that I would very appreciate, it is the ability to name the dimensions in an array in python. For example I have a numpy array with 3 dimensions and I will regularly have to sum it along a specific dimensions.
So I can do with a ndarray a
:
sum(a, axis=2)
if my relevant dimension is the last one, but I want to make it "position independent", i.e. a user can provide any array, as long as he specifies "this dimension is "DI" " (example, for "Dimension of Interest"). So basically I would like to be able to write:
sum(a, axis="DI")
Close to NETCDF, but I don't want to implement a whole netcdf capability.