Numpy Array Get Number Of Dimensions In String