undim function

Removes the dimension of an object