ndim function

number of dimensions