Allow inferring dimension from units.