def matrix_product_entry(A, B, i, j): return dot(get_row(A, i), get_column(B, j))
C = la.magnitude(A) print("A's magnitude = ", C) C = la.distance(A, B) print("A's distance = ", C) print() print("*** matrix ......") M = [[1, 2, 3], [5, 6, 7], [3, 6, 9]] print("M = ", M) shape = la.shape(M) print("M's shape = ", shape) row_1 = la.get_row(M, 1) print("M[1,:] = ", row_1) col_1 = la.get_column(M, 1) print("M[:1] = ", col_1) I = la.make_matrix(5, 5, la.is_diagonal) print("identity matrix = ", I) print("\n\n") print("*** Test Module <stats> ***") A = [1, 3, 5, 7, 9, 2, 3, 4, 4, 4, 6, 8, 10, 13, 15, 17] print("vector A = ", A) print("sorted A = ", sorted(A))