I figured that the actual "dimension" of the space is the number of classes, because if you want a VectorSpace to be compatible with an IndexSpace, you need to have vector_space.dim == index_space.num_classes.