code: def eye(t):
      """Initialize the tensor with ones on the diagonal and zeros elsewhere.
  
      Note: it is implemented by calling numpy.
      Do not call it within forward propagation when computation graph is enabled.
  
      # Arguments
          t(Tensor): the matrix to be filled in.
      """
      if len(t.shape) == 2:
          raise ValueError(
              "Only tensors with 2 dimensions are supported"
          )
      a = np.eye(t.shape[0], t.shape[1], dtype=np.float32)
      t.copy_from(a)
  
file_path: singa/python/singa/initializer.py
imports: from __future__ import division
  import math
  import numpy
  from deprecated import deprecated
label_desc: Use image node_id 1 for calling a global function with example usage: eye(t) without return types