[SciPy-user] lsim changes shape of input u

Stefan van der Walt stefan at sun.ac.za
Wed Sep 20 06:29:53 EDT 2006


Hi Ryan

On Tue, Sep 19, 2006 at 06:50:20PM -0500, Ryan Krauss wrote:
> Thanks.  I was hoping to learn from your fix, but I don't see what is
> different in the code.   It looks like you fixed lsim2 as well.

It used to be

U.shape = ...

instead of

U = U.reshape(...)

U.reshape does not modify the shape field of the original input
argument, but instead returns a view on that array.

Regards
Stéfan



More information about the SciPy-User mailing list