parameters: (a, ind, v, mode='raise')
return_statement: return put(ind, v, mode=mode)
docstring: Replaces specified elements of an array with given values.
  
      The indexing works on the flattened target array. `put` is roughly
      equivalent to:
  
      ::
  
          a.flat[ind] = v
  
      Parameters
      ----------
      a : ndarray
          Target array.
      ind : array_like
          Target indices, interpreted as integers.
      v : array_like
          Values to place in `a` at target indices. If `v` is shorter than
          `ind` it will be repeated as necessary.
      mode : {'raise', 'wrap', 'clip'}, optional
          Specifies how out-of-bounds indices will behave.
  
          * 'raise' -- raise an error (default)
          * 'wrap' -- wrap around
          * 'clip' -- clip to the range
  
          'clip' mode means that all indices that are too large are replaced
          by the index that addresses the last element along that axis. Note
          that this disables indexing with negative numbers.
  
      See Also
      --------
      putmask, place
      put_along_axis : Put elements by matching the array and the index arrays
  
      Examples
      --------
      >>> a = np.arange(5)
      >>> np.put(a, [0, 2], [-44, -55])
      >>> a
      array([-44,   1, -55,   3,   4])
  
      >>> a = np.arange(5)
      >>> np.put(a, 22, -5, mode='clip')
      >>> a
      array([ 0,  1,  2,  3, -5])
docstring_summary: Replaces specified elements of an array with given values.
docstring_tokens: Replaces specified elements of an array with given values .
function: def put(a, ind, v, mode='raise'):
      """
      Replaces specified elements of an array with given values.
  
      The indexing works on the flattened target array. `put` is roughly
      equivalent to:
  
      ::
  
          a.flat[ind] = v
  
      Parameters
      ----------
      a : ndarray
          Target array.
      ind : array_like
          Target indices, interpreted as integers.
      v : array_like
          Values to place in `a` at target indices. If `v` is shorter than
          `ind` it will be repeated as necessary.
      mode : {'raise', 'wrap', 'clip'}, optional
          Specifies how out-of-bounds indices will behave.
  
          * 'raise' -- raise an error (default)
          * 'wrap' -- wrap around
          * 'clip' -- clip to the range
  
          'clip' mode means that all indices that are too large are replaced
          by the index that addresses the last element along that axis. Note
          that this disables indexing with negative numbers.
  
      See Also
      --------
      putmask, place
      put_along_axis : Put elements by matching the array and the index arrays
  
      Examples
      --------
      >>> a = np.arange(5)
      >>> np.put(a, [0, 2], [-44, -55])
      >>> a
      array([-44,   1, -55,   3,   4])
  
      >>> a = np.arange(5)
      >>> np.put(a, 22, -5, mode='clip')
      >>> a
      array([ 0,  1,  2,  3, -5])
  
      """
      try:
          put = a.put
      except AttributeError:
          raise TypeError("argument 1 must be numpy.ndarray, "
                          "not {name}".format(name=type(a).__name__))
  
      return put(ind, v, mode=mode)
function_tokens: def put ( a , ind , v , mode = 'raise' ) : try : put = a . put except AttributeError : raise TypeError ( "argument 1 must be numpy.ndarray, " "not {name}" . format ( name = type ( a ) . __name__ ) ) return put ( ind , v , mode = mode )