I would like to have a valid code for either 2D or 1D masked array to extract a 1D array from it. In the 2D case, one column would be entirely masked and should be removed (