@@ -0,0 +1,1593 @@
+#!/usr/bin/python%0A# Linear Algebra with Python%0Aimport numpy as np%0A%0Adef numpy_show():%0A    # create a column vector%0A    col_vec = np.array(%5B%5B1%5D, %5B2%5D%5D)%0A    print %22column vector%22%0A    print col_vec%0A%0A    # create a row vector%0A    row_vec = np.array(%5B%5B1, 2%5D%5D)%0A    print %22row vector%22%0A    print row_vec%0A%0A    # create a matrix%0A    mat = np.array(%5B%5B1, 2%5D, %5B3, 4%5D%5D)%0A    print %22matrix%22%0A    print mat%0A%0A    # inspect dimensions%0A    print %22row vector dimensions%22, row_vec.ndim%0A    shape = row_vec.shape%0A    print %22row vector rows%22, shape%5B0%5D, %22columns%22, shape%5B1%5D%0A%0A    print %22matrix dimensions%22, mat.ndim%0A    shape = mat.shape%0A    print %22matrix rows%22, shape%5B0%5D, %22columns%22, shape%5B1%5D%0A%0A    # transpose%0A    vec_t = row_vec.transpose()  # or row_vec.T%0A    print %22transposed vector%22%0A    print vec_t%0A%0A    mat_t = mat.transpose()  # or mat.T%0A    print %22transposed matrix%22%0A    print mat_t%0A%0A    a = np.array(%5B%5B2%5D, %5B-4%5D, %5B1%5D%5D)%0A    b = np.array(%5B%5B2%5D, %5B1%5D, %5B-2%5D%5D)%0A%0A    # addition%0A    print %22a + b%22%0A    print a + b%0A%0A    # subtraction%0A    print %22a - b%22%0A    print a - b%0A%0A    # scalar multiplication%0A    print %221.2 * a%22%0A    print 1.2 * a%0A%0A    # element wise multiplication%0A    print %22a * b%22%0A    print a * b%0A%0A    # vector scalar product%0A    print %22a . b%22%0A    print np.dot(a.transpose(), b)%0A%0A    # vector cross product%0A    print %22a x b%22%0A    print np.cross(a, b, axis=0)  # or np.cross(a.T, b.T).T%0A%0A    identity = np.array(%5B%5B1, 0%5D, %5B0, 1%5D%5D)%0A%0A    # matrix vector product%0A    print %22identity . col_vec%22%0A    print np.dot(identity, col_vec)%0A%0A    # matrix product%0A    print %22identity . mat%22%0A    print np.dot(identity, mat)%0A%0Anumpy_show()

Add Linear Algebra python Example