def randu_array(nchars, size, dtype='O'):
 retval = np.random.choice(RANDU_CHARS, size=(nchars * np.prod(size))).view((np.unicode_, nchars)).reshape(size)
 if (dtype is None):
  return retval
 else:
  return retval.astype(dtype)

def randu_array ( nchars , size , dtype = 'O' ) : retval = np . random . choice ( RANDU_CHARS , size = ( nchars * np . prod ( size ) ) ) . view ( ( np . unicode_ , nchars ) ) . reshape ( size ) if ( dtype is None ) : return retval else : return retval . astype ( dtype )
generate an array of unicode strings .