<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nDims(self):
 """ The number of dimensions of the index. Will always be 1. """

        result = self._index.ndim
        assert result == 1, "Expected index to be 1D, got: {}D".format(result)
        return result