code: def identity(n: int, dtype: DTypeLike = float) -> NDArray[Any]:
      """Returns a 2-D identity array.
  
      It is equivalent to ``eye(n, n, dtype)``.
  
      Args:
          n (int): Number of rows and columns.
          dtype (data-type, optional): Data type specifier.
  
      Returns:
          cupy.ndarray: A 2-D identity array.
  
      .. seealso:: :func:`numpy.identity`
  
      """
      return eye(n, dtype=dtype)
  
file_path: cupy/cupy/_creation/basic.py
imports: from typing import Any, Optional
  import numpy
  import cupy
  from cupy._core.internal import _get_strides_for_order_K, _update_order_char
  from cupy.typing._types import _OrderKACF, _OrderCF, _ShapeLike, DTypeLike, NDArray
label_desc: Use image node_id 5 for calling a global function with example usage: identity(n, dtype) and returns: eye