parameters: (a, axis)
return_statement: return a.reshape(shape[:axis] + (1,) + shape[axis:])
docstring: Expand the shape of an array.
  
      Insert a new axis, corresponding to a given position in the array shape.
  
      Parameters
      ----------
      a : array_like
          Input array.
      axis : int
          Position (amongst axes) where new axis is to be inserted.
  
      Returns
      -------
      res : ndarray
          Output array. The number of dimensions is one greater than that of
          the input array.
  
      See Also
      --------
      doc.indexing, atleast_1d, atleast_2d, atleast_3d
  
      Examples
      --------
      >>> x = np.array([1,2])
      >>> x.shape
      (2,)
  
      The following is equivalent to ``x[np.newaxis,:]`` or ``x[np.newaxis]``:
  
      >>> y = np.expand_dims(x, axis=0)
      >>> y
      array([[1, 2]])
      >>> y.shape
      (1, 2)
  
      >>> y = np.expand_dims(x, axis=1)  # Equivalent to x[:,newaxis]
      >>> y
      array([[1],
             [2]])
      >>> y.shape
      (2, 1)
  
      Note that some examples may use ``None`` instead of ``np.newaxis``.  These
      are the same objects:
  
      >>> np.newaxis is None
      True
docstring_summary: Expand the shape of an array.
docstring_tokens: Expand the shape of an array .
function: def expand_dims(a, axis):
      """
      Expand the shape of an array.
  
      Insert a new axis, corresponding to a given position in the array shape.
  
      Parameters
      ----------
      a : array_like
          Input array.
      axis : int
          Position (amongst axes) where new axis is to be inserted.
  
      Returns
      -------
      res : ndarray
          Output array. The number of dimensions is one greater than that of
          the input array.
  
      See Also
      --------
      doc.indexing, atleast_1d, atleast_2d, atleast_3d
  
      Examples
      --------
      >>> x = np.array([1,2])
      >>> x.shape
      (2,)
  
      The following is equivalent to ``x[np.newaxis,:]`` or ``x[np.newaxis]``:
  
      >>> y = np.expand_dims(x, axis=0)
      >>> y
      array([[1, 2]])
      >>> y.shape
      (1, 2)
  
      >>> y = np.expand_dims(x, axis=1)  # Equivalent to x[:,newaxis]
      >>> y
      array([[1],
             [2]])
      >>> y.shape
      (2, 1)
  
      Note that some examples may use ``None`` instead of ``np.newaxis``.  These
      are the same objects:
  
      >>> np.newaxis is None
      True
  
      """
      a = asarray(a)
      shape = a.shape
      if axis < 0:
          axis = axis + len(shape) + 1
      return a.reshape(shape[:axis] + (1,) + shape[axis:])
function_tokens: def expand_dims ( a , axis ) : a = asarray ( a ) shape = a . shape if axis < 0 : axis = axis + len ( shape ) + 1 return a . reshape ( shape [ : axis ] + ( 1 , ) + shape [ axis : ] )