def test_denoise_tv_chambolle_4d():
 im = (255 * np.random.rand(8, 8, 8, 8))
 res = restoration.denoise_tv_chambolle(im.astype(np.uint8), weight=0.1)
 assert_((res.dtype == np.float))
 assert_(((res.std() * 255) < im.std()))

def test_denoise_tv_chambolle_4d ( ) : im = ( 255 * np . random . rand ( 8 , 8 , 8 , 8 ) ) res = restoration . denoise_tv_chambolle ( im . astype ( np . uint8 ) , weight = 0.1 ) assert_ ( ( res . dtype == np . float ) ) assert_ ( ( ( res . std ( ) * 255 ) < im . std ( ) ) )
tv denoising for a 4d input .