I am pretty new to python. I am currently working with urban heat island intensity. The first 10 rows of the 3-hourly uhi intensity data is as follows,
uhii = array([[ 1.9, 1.4, 1. , 0.6, 1.9, 0.6, 0.5, 2. ],
[-2.1, -1.3, -3. , 1.8, 0.7, 1. , 0.8, 0. ],
[ 0.2, 0.4, -1.8, 1.1, 0.2, -0.2, 0.4, 0. ],
[ 0.5, 0. , -0.2, 1. , 0.8, 0.1, 3.4, -0.1],
[ 1.3, 0. , 0. , 0.7, 0. , 0.9, -1. , 1. ],
[ 1.4, 1.6, 0.6, 0.4, -0.5, 0.4, 1.9, 0.7],
[ 0.8, 0.7, 0.5, 1.6, 1.5, 0.9, 1.7, 1. ],
[ 0.1, -1.6, -0.3, 2.4, 0.9, -0.2, 0.5, 0.4],
[ 0.2, -1.5, -0.1, 1.1, 0.5, 0.6, -0.2, 0.4],
[ 1.2, 1.6, -1.2, -0.4, -0.5, 1.2, 0.6, 1.6]])])
here, the hours are 3,6,9,12,15,18,21,00 LST, respectively. I want and array that will give the the number of occurrence of maximum UHII at a certain LST.
For example, in the uhii array, maximum occurs at 3 LST (along column 1) only once, and at 12 LST (along column 4) 4 times, at 21 LST (along column 7) 3 times.
Therefore, if I consider this uhii array, the result I want is
result = array([1,1,0,4,0,0,3,1])
I think I need the loop function, but I cant figure out how to write the logical steps that will lead me to the result I want.
The shape of this uhii array is (10,8), but the data I am working with has a shape of (9922,8).