[SciPy-User] Array Selection Help -Part2-

Lothar Ulferts l.ulferts@hs-osnabrueck...
Wed May 23 09:06:43 CDT 2012


Dear list,

based upon the thread "Array Selection Help"
http://thread.gmane.org/gmane.comp.python.scientific.user/19412 I would like to
modifiy the task a little bit:
The arr1 contains numbers (label) , arr2 floating points (values). But, here it
is different, zones shouldn't be 'Multiparts'. A zone should be split into its
untouched parts. 
For example:
label:
100 100 100 -99 -99 -99       100 100 100 -99 -99 -99
100 100 -99 -99 200 200       100 100 -99 -99 200 200
-99 -99 -99 -99 200 200  =>   -99 -99 -99 -99 200 200 
300 300 300 300 300 300       300 300 300 300 300 300
200 200 200 -99 100 100       300 400 400 -99 500 500
200 200 200 -99 100 100       400 400 400 -99 500 500

values:
1.5 1.9 1.8 0.3 0.1 0.1
1.5 1.7 0.6 0.3 2.5 2.9
0.6 0.6 0.8 0.4 2.1 2.1
3.1 3.2 3.3 3.4 3.5 3.6
4.7 4.7 4.0 0.1 1.0 1.4
4.3 4.0 4.9 0.3 1.2 1.1

Result of zonal min should be:
1.7 1.7 1.7 -99 -99 -99
1.7 1.7 -99 0.3 2.9 2.9
-99 -99 -99 -99 2.9 2.9
3.6 3.6 3.6 3.6 3.6 3.6
4.0 4.0 4.0 -99 1.0 1.0
4.0 4.0 4.0 -99 1.0 1.0


The question is, how do I tranform the left array to the right?

beste regards
Lothar



More information about the SciPy-User mailing list