def ndget(ind, data):
 if (isinstance(ind, tuple) and (len(ind) == 1)):
  ind = ind[0]
 if (not isinstance(ind, tuple)):
  return get(ind, data)
 result = get(ind[0], data)
 if isinstance(ind[0], (list, slice)):
  return type(result)((ndget(ind[1:], row) for row in result))
 else:
  return ndget(ind[1:], result)

def ndget ( ind , data ) : if ( isinstance ( ind , tuple ) and ( len ( ind ) == 1 ) ) : ind = ind [ 0 ] if ( not isinstance ( ind , tuple ) ) : return get ( ind , data ) result = get ( ind [ 0 ] , data ) if isinstance ( ind [ 0 ] , ( list , slice ) ) : return type ( result ) ( ( ndget ( ind [ 1 : ] , row ) for row in result ) ) else : return ndget ( ind [ 1 : ] , result )
get from n-dimensional getable can index with elements .