Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)
Function to insert one Matrix (1,m) (data) in another Matrix (n,m) (mat)
at location 'offset' and return the resulting Matrix (res).
The lenght of "data" must be the same as the number of rows in  "mat". 

        def insertmat(mat, data, offset):
    """ Function to insert one Matrix (1,m) (data) in another Matrix (n,m) (mat)
        at location 'offset' and return the resulting Matrix (res).
        The lenght of "data" must be the same as the number of rows in  "mat". """
    res = []
    for row in range(len(mat)):
        res.append(mat[row][:])       # insert matrix orignal data
        res[row][offset] = data[row]  # copy in data item
    return res
        


src/n/e/netana-1.0.0/netana/mkreport.py   netana(Download)
from Tkinter import *
import math,time
from bldmat import *
from matutil import insertmat,evalmat
from tkMessageBox import showerror
					self.matvalues = self.EvalEqu(self.Mat)
					# Solve for all voltages or currents.
					determ = insertmat(self.matvalues,m,n)
					num = evalmat(determ)
					dem = evalmat(self.matvalues)
		print >> self.outfile,'#### Units =', dLab,'####\n'
		for n in range(self.Nodes):
			determ = insertmat(self.matvalues,m,n)
			num = evalmat(determ)
			res = num/dem