[SciPy-Dev] First contact

Derek Homeier derek@astro.physik.uni-goettingen...
Wed Aug 11 10:02:59 CDT 2010

Hi Roberto,

welcome to the list!

> The first problem was related with the function "ss2tf" which gives  
> as return
> numerator a 2 dimensional array, not more usable by the print  
> function of the
> class. I added these lines at the end of the function:
>    # Avoid leading zeros in num
>    num=num[0]
>    while num[0]==0:
>        num=num[1:]
> but I don't want to get problems with other modules...

I must admit I have no idea what this output is typically supposed to  
look like,
but I note that in the first step you are already replacing a 2D-array  
with its first
1D-element, which is probably not desired if you have input with  
D.shape[0] > 1.
The print function of which class are you referring to BTW?

For the second part, you could replace the "while" loop with a numpy  

num = num[num.nonzero()[0][0]:]


More information about the SciPy-Dev mailing list