code: def string_to_one_hot(string, maxchar):
      """Converts an ASCII string to a one-of-k encoding."""
      ascii = np.array([ord(c) for c in string]).T
      return np.array(
          ascii[:, None] == np.arange(maxchar)[None, :], dtype=int
      )
  
file_path: autograd/examples/rnn.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  from builtins import range
  import autograd.numpy
  import autograd.numpy.random
  from autograd import grad
  from autograd.scipy.special import logsumexp
  from os.path import dirname, join
  from autograd.misc.optimizers import adam
label_desc: Use image node_id 6 for calling a global function with example usage: string_to_one_hot(string, maxchar) and returns: np