def test_medianFilter_withNaN(): """median filtering an all 0 array, with one NaN value """ inputArray = np.zeros(100) inputArray[50] = np.NaN outputArray = st.medianFilter(inputArray) assert_array_equal(outputArray, np.zeros(100))
def test_medianFilter(): """median filtering an all 0 array, with one different value in the middle """ inputArray = np.zeros(100) inputArray[50] = 2 outputArray = st.medianFilter(inputArray) assert_array_equal(outputArray, np.zeros(100))