From: Paul D. <pfd...@gm...> - 2006-06-22 20:26:06
|
Pierre wrote: > I agree that's a bit confusing here, and there might be some room for > improvement (for example, changing the current > `if m is nomask` to `if m is nomask or m.any()==False`, or better, forcing > mask to nomask if mask.any()==False). But I don;t think that qualifies as > bug. In the original MA in Numeric, I decided that to constantly check for masks that didn't actually mask anything was not a good idea. It punishes normal use with a very expensive check that is rarely going to be true. If you are in a setting where you do not want this behavior, but instead want masks removed whenever possible, you may wish to wrap or replace things like masked_array so that they call make_mask with flag = 1: y = masked_array(data, make_mask(maskdata, flag=1)) y will have no mask if maskdata is all false. Thanks to Pierre for pointing out about masked_print_option. Paul |