get_dimension function

Get dimension