Add method "diag" into builtin which is analog to numpy's builtin method [diag].  Associated tests added.