parameters: (dtype)
return_statement: return typename
docstring: Convert a dtype to a short form which evaluates to the same dtype.
  
      The intent is roughly that the following holds
  
      >>> from numpy import *
      >>> dt = np.int64([1, 2]).dtype
      >>> assert eval(dtype_short_repr(dt)) == dt
docstring_summary: Convert a dtype to a short form which evaluates to the same dtype.
docstring_tokens: Convert a dtype to a short form which evaluates to the same dtype .
function: def dtype_short_repr(dtype):
      """
      Convert a dtype to a short form which evaluates to the same dtype.
  
      The intent is roughly that the following holds
  
      >>> from numpy import *
      >>> dt = np.int64([1, 2]).dtype
      >>> assert eval(dtype_short_repr(dt)) == dt
      """
      if dtype.names is not None:
          # structured dtypes give a list or tuple repr
          return str(dtype)
      elif issubclass(dtype.type, flexible):
          # handle these separately so they don't give garbage like str256
          return "'%s'" % str(dtype)
  
      typename = dtype.name
      # quote typenames which can't be represented as python variable names
      if typename and not (typename[0].isalpha() and typename.isalnum()):
          typename = repr(typename)
  
      return typename
function_tokens: def dtype_short_repr ( dtype ) : if dtype . names is not None : # structured dtypes give a list or tuple repr return str ( dtype ) elif issubclass ( dtype . type , flexible ) : # handle these separately so they don't give garbage like str256 return "'%s'" % str ( dtype ) typename = dtype . name # quote typenames which can't be represented as python variable names if typename and not ( typename [ 0 ] . isalpha ( ) and typename . isalnum ( ) ) : typename = repr ( typename ) return typename