[SciPy-user] how to convert this matlab command to scipy?
Hoyt Koepke
hoytak at gmail.com
Fri May 16 02:38:53 EDT 2008
I have to say I haven't seen that particular operation in matlab
before. Is mask a logical matrix or a matrix of indices? If it's a
logical matrix, I really don't understand what it's trying to do.
If it's a matrix of indices, then you might get the same behavior in
numpy by using CYf[mask.ravel()] -- but I'm really not sure of this.
Normally, logical mask operations have to match shape exactly, and
index matrices are one dimensional....
--Hoyt
On Thu, May 15, 2008 at 5:18 PM, zhang chi <zhangchipr at gmail.com> wrote:
> hi
> How to convert this matlab command (Yf12(:) = CYf(mask);) to scipy
> command?
> where
> size(CYf) = (128 1)
> size(mask) = (128 128)
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
--
+++++++++++++++++++++++++++++++++++
Hoyt Koepke
UBC Department of Computer Science
http://www.cs.ubc.ca/~hoytak/
hoytak at gmail.com
+++++++++++++++++++++++++++++++++++
More information about the SciPy-User
mailing list