- Joined
- Apr 7, 2022
- Messages
- 14
- Reaction score
- 0
Hi Guys,
What I am looking for:
I want to get the single mode from all 90 points. (in this case, it will be a single mode value of 230)
Is there a way to get a mode of all the elements/points within a 2D array?
When I run:
I get the following:
My attempt at solution:
I get:
This gives me 9 modes, one for each column in my array (aka, this is wrong because it is not a single mode based on all 90 points).
Any ideas?
Thanks
What I am looking for:
I want to get the single mode from all 90 points. (in this case, it will be a single mode value of 230)
Is there a way to get a mode of all the elements/points within a 2D array?
When I run:
Code:
a = np.array(arrOriginalImage01[YPixelsPerStud*(Yi01-1):YPixelsPerStud*Yi01,XPixelsPerStud*(Xi01-1):XPixelsPerStud*Xi01,0])
My attempt at solution:
Code:
from scipy import stats
stats.mode(a)
This gives me 9 modes, one for each column in my array (aka, this is wrong because it is not a single mode based on all 90 points).
Any ideas?
Thanks