From: Richard M. <mu...@cd...> - 2011-04-17 19:43:05
|
Had the settings on the list wrong, so this got accidentally discarded (fixed now). -richard Begin forwarded message: > From: pyt...@li... > Date: 17 April 2011 11:45:36 PDT > To: pyt...@li... > Subject: Auto-discard notification > > The attached message has been automatically discarded. > From: gor...@us... > Date: 17 April 2011 11:45:29 PDT > To: pyt...@li... > Subject: SF.net SVN: python-control:[156] trunk/src/xferfcn.py > > > Revision: 156 > http://python-control.svn.sourceforge.net/python-control/?rev=156&view=rev > Author: goretkin > Date: 2011-04-17 18:45:29 +0000 (Sun, 17 Apr 2011) > > Log Message: > ----------- > The following no longer causes a Numpy ValueError: > (cases where the order of the numerator is higher than the order of the denominator) > > s = control.tf.TransferFunction([1, 0], [1]) > control.bode(s) > > Modified Paths: > -------------- > trunk/src/xferfcn.py > > Modified: trunk/src/xferfcn.py > =================================================================== > --- trunk/src/xferfcn.py 2011-04-16 23:45:46 UTC (rev 155) > +++ trunk/src/xferfcn.py 2011-04-17 18:45:29 UTC (rev 156) > @@ -643,8 +643,10 @@ > # are the same size as the denominator. > for i in range(self.outputs): > for j in range(self.inputs): > - num[i][j] = insert(num[i][j], zeros(len(den) - len(num[i][j])), > - zeros(len(den) - len(num[i][j]))) > + pad = len(den) - len(num[i][j]) > + if(pad>0): > + num[i][j] = insert(num[i][j], zeros(pad), > + zeros(pad)) > # Finally, convert the numerator to a 3-D array. > num = array(num) > # Remove trivial imaginary parts. Check for nontrivial imaginary parts. > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > > |