[SciPy-user] Shape Problem
Louis Pecora
pecora at anvil.nrl.navy.mil
Wed Oct 18 08:22:01 EDT 2006
Sam frizou wrote:
> Hi,
>
> I use a matrix M of shape (20,25).
>
> If I do N=M[18:,18:] I correctly obtain the submatrix of M of shape (2,7).
>
> Now, if I do N=M[19:,19:], I expect to have the submatrix of M of
> shape (1,6) but the shape of N is (6,1).
> Is there any way to obtain the correct shape in any case ?
>
> Thank you very much for your help.
>
> Sam
>
I just tried this (MacOS X 10.4, Python 2.4, NumPy) and got the right
answer (1,6). What modules are you using? Might need an upgrade there.
--
Cheers,
Lou Pecora
Code 6362
Naval Research Lab
Washington, DC 20375
USA
Ph: +202-767-6002
email: pecora at anvil.nrl.navy.mil
More information about the SciPy-User
mailing list