On Sep 11, 2010, at 9:53 PM, Massimo Di Stefano wrote: > have you hints on how to get working the "MASK" code ? > as it is now it pick all the points in the "mydata" array.
Brett's code for the mask matched the loop of your post. However, taking a second look at it, I don't see why it would work. Mind trying something like # Selection on the NS axis yselect = (mydata[:,1] <= N) & (mydata[:,1] >= S) # selection on the EW axis xselect = (mydata[:,1] <= E) & (mydata[:,1] >= W) # Global selection selected_data = mydata[xselect & yselect] Now you can check in selected data that the coordinates are indeed in the rectangle that you want, and take the min/max of your data as needed. let me know how it goes P. _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
