[SciPy-user] how to convert this matlab command to scipy?
Fri May 16 01:38:53 CDT 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....
On Thu, May 15, 2008 at 5:18 PM, zhang chi <firstname.lastname@example.org> wrote:
> How to convert this matlab command (Yf12(:) = CYf(mask);) to scipy
> size(CYf) = (128 1)
> size(mask) = (128 128)
> SciPy-user mailing list
UBC Department of Computer Science
More information about the SciPy-user