Loading...
Create identity matrices using NumPy.
Write a function create_identity(n) that returns a dictionary with:
Return a dictionary with exactly these three keys.
n = 3
{'identity': [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], 'trace': 3.0, 'shape': [3, 3]}3x3 identity has 1s on diagonal, trace = 1+1+1 = 3