Corrected writing of quantities with arbitrary number of dimensions.