Reputation: 1986
I'm interesting in the way to get median of 3D array (cube).
While I understand how to calculate median of simple 1D array, I could not find the way how it should work in 3 dimensions.
Could anybody explain how to find median value of 3D, please.
Thanks.
Upvotes: 0
Views: 670
Reputation: 133024
There is no such thing as a median of a 3D array. There's only a median of a list of numbers. If your list is stored as a 3D array, that's of little consequence. Just copy all the elements into a 1D array, sort it, and take the middle element.
Upvotes: 2