def forward(data, impulse_response=None, filter_params={}, predefined_filter=None):
 assert_nD(data, 2, 'data')
 if (predefined_filter is None):
  predefined_filter = LPIFilter2D(impulse_response, **filter_params)
 return predefined_filter(data)

def forward ( data , impulse_response = None , filter_params = { } , predefined_filter = None ) : assert_nD ( data , 2 , 'data' ) if ( predefined_filter is None ) : predefined_filter = LPIFilter2D ( impulse_response , ** filter_params ) return predefined_filter ( data )
apply the given filter to data .