def test_byte_order_median():
 a = np.arange(9, dtype='<f4').reshape(3, 3)
 ref = ndimage.filters.median_filter(a, (3, 3))
 b = np.arange(9, dtype='>f4').reshape(3, 3)
 t = ndimage.filters.median_filter(b, (3, 3))
 assert_array_almost_equal(ref, t)

def test_byte_order_median ( ) : a = np . arange ( 9 , dtype = '<f4' ) . reshape ( 3 , 3 ) ref = ndimage . filters . median_filter ( a , ( 3 , 3 ) ) b = np . arange ( 9 , dtype = '>f4' ) . reshape ( 3 , 3 ) t = ndimage . filters . median_filter ( b , ( 3 , 3 ) ) assert_array_almost_equal ( ref , t )
regression test for #413: median_filter does not handle bytes orders .