cp-library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub kobejean/cp-library

:heavy_check_mark: cp_library/math/linalg/mat/mat_id_fn.py

Required by

Verified with

Code

import cp_library.__header__
import cp_library.math.__header__
import cp_library.math.linalg.__header__
import cp_library.math.linalg.mat.__header__

def mat_id(N):
    return [[int(i==j) for j in range(N)] for i in range(N)]
'''
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
             https://kobejean.github.io/cp-library               
'''




def mat_id(N):
    return [[int(i==j) for j in range(N)] for i in range(N)]
Back to top page