[Matplotlib-users] some numpy help for clipping rows/column of masked data

2008年9月12日 07:04:01 -0700

Hi,
I was wondering if the matplotlib users would be able to help with a numpy 
problem.
I have 2 dimensional arrays of latitudes and longitude named lon and lat and 
only want to extract
lats and lons within a certain domain
It is easy to apply the mask
lonMask = (lon >= minLon) & (lon <= maxLon)
latMask = (lat >= minLat) & (lat <= maxLat)
MyNewArray = putmask(originalArray,lonMask*latMask)
But I am not sure how to clip rows and column of mask data to reduce size of 
resulting array.
The compress, extract etc functions all seem to work with 1D arrays and I don;t 
know how to get from my 1D array back to a 2D array.
I hope this is making sense.
Marjolaine.
-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean. MailScanner thanks Transtec Computers for their 
support.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to