#NEWLINE# @ parameter_space ( dtype = [ float64_dtype , int64_dtype , datetime64ns_dtype ] , missing_value = [ 0 , 10000 ] , window_length = [ 2 , 3 ] ) #NEWLINE# def test_masking( self , dtype , missing_value , window_length ) : #NEWLINE# #INDENT# missing_value = coerce_to_dtype ( dtype , missing_value ) #NEWLINE# baseline_ints = arange ( 15 ) . reshape ( 5 , 3 ) #NEWLINE# baseline = baseline_ints . astype ( dtype ) #NEWLINE# mask = ( baseline_ints % 2 ) . astype ( bool ) #NEWLINE# masked_baseline = where ( mask , baseline , missing_value ) #NEWLINE# array = AdjustedArray ( baseline , mask , adjustments = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , missing_value = missing_value ) #NEWLINE# gen_expected = moving_window ( masked_baseline , window_length ) #NEWLINE# gen_actual = array . traverse ( window_length ) #NEWLINE# for ( expected , actual ) in zip ( baseline_ints , gen_actual ) : #NEWLINE# #INDENT# check_arrays ( expected , actual )