[SciPy-user] signal.lti

Ryan Krauss ryanlists at gmail.com
Fri Sep 8 07:40:28 CDT 2006


Thanks for your thought Stefan.  No, I am not running on a 64 bit
machine.  I tried your idea and tried dtype=N.float32 (which is what I
think it should be).  Same error message.

Ryan

On 9/8/06, Stefan van der Walt <stefan at sun.ac.za> wrote:
> Hi Ryan
>
> On Thu, Sep 07, 2006 at 09:55:29PM -0500, Ryan Krauss wrote:
> > I am having a rough time trying to use the lti portion of
> > scipy.signal.  For starters, I just wanted to generate a step response
> > for an integrator (1/s).  I tried creating this system two ways, and
> > neither seems to work correctly.  I think this system has a numerator
> > of 1 and a denominator of [1,0].
>
> <snip>
>
> > In [46]: A=array([[0,1],[0,0]])
> >
> > In [47]: B=array([[0],[1]])
> >
> > In [48]: C=array([[1,0]])
> >
> > In [49]: D=array([[0]])
> >
> > but for some reason I can't create a system with these matrices:
> >
> > In [50]: mysys=scipy.signal.lti(A,B,C,D)
>
> <snip>
>
> > TypeError: array cannot be safely cast to required type
>
> Are you running a 64-bit platform?  Maybe try
>
> import numpy as N
> import scipy.signal
>
> A=N.array([[0,1],[0,0]],dtype=N.int32)
> B=N.array([[0],[1]],dtype=N.int32)
> C=N.array([[1,0]],dtype=N.int32)
> D=N.array([[0]],dtype=N.int32)
> mysys=scipy.signal.lti(A,B,C,D)
>
> Regards
> Stéfan
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-user mailing list