How to filter 3D array with a 2D mask
How to filter 3D array with a 2D mask Question: I have a (m,n,3) array data and I want to filter its values with a (m,n) mask to receive a (x,3) output array. The code below works, but how can I replace the for loop with a more efficient alternative? import numpy as np data …