This question is a new one (I've already looked into similar questions and did not find what I need). Therefore:
What is the most efficient way to apply a weighted median to every subarray of a 2d numpy
matrix efficiently? (No extra frameworks, but pure numpy
if possible)
Data = np.asarray([[ 1.1, 7.8, 3.3, 4.9],
[ 6.1, 9.8, 5.3, 7.9],
[ 4.1, 4.8, 3.3, 7.1],
...
[ 1.1, 7.4, 3.1, 4.9],
[ 7.1, 3.8, 7.3, 8.1],
[ 19.1, 2.8, 3.2, 1.1]])
weights = [0.64, 0.79, 0.91, 0]
Note: the answers to the other questions only show an 1d problem. This problem hast to deal with 1.000.000 subarrays efficiently