examples/numpy/create_eye.py
from __future__  import print_function
import numpy

a = numpy.eye(4)
print(a)

# [[ 1.  0.  0.  0.]
#  [ 0.  1.  0.  0.]
#  [ 0.  0.  1.  0.]
#  [ 0.  0.  0.  1.]]

b = numpy.eye(3, 5)
print(b)

# [[ 1.  0.  0.  0.  0.]
#  [ 0.  1.  0.  0.  0.]
#  [ 0.  0.  1.  0.  0.]]