#!/usr/bin/env python3 import numpy as np matrix = np.array([[1, 2, 3], [2, 4, 6], [3, 8, 9]]) print(matrix.trace()) # 14