cast indexes to float
correct nd normalization