[Scipy-tickets] [SciPy] #1879: ss2tf returns num as 2D array instead of 1D

SciPy Trac scipy-tickets@scipy....
Thu Mar 28 11:12:45 CDT 2013


#1879: ss2tf returns num as 2D array instead of 1D
--------------------------+-------------------------------------------------
 Reporter:  guo           |       Owner:  cdavid     
     Type:  defect        |      Status:  new        
 Priority:  normal        |   Milestone:  Unscheduled
Component:  scipy.signal  |     Version:  0.11.0     
 Keywords:  ss2tf, num    |  
--------------------------+-------------------------------------------------
 I use

 {{{
 (num_x, den_x) = ss2tf(A,B,C,D)
 }}}

 with

 {{{
 A =
 [[ 1 -1]
  [ 1  0]]
 B =
 [[ 1.]
  [ 0.]]
 C =
 [[0 1]]
 D =
 [[ 0.]]
 }}}

 and it returns

 {{{
 num =
 [[ 0.  0.  1.]]
 den =
 [ 1. -1.  1.]
 }}}

 We see that num is a 2D array. According to the documentation it should be
 a 1D array.
 This seems to be caused by line 180 in ltisys.py

 {{{
 num = numpy.zeros((nout, num_states + 1), type_test.dtype)
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1879>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list