def order_filter(a, domain, rank):
 domain = asarray(domain)
 size = domain.shape
 for k in range(len(size)):
  if ((size[k] % 2) != 1):
   raise ValueError('Each dimension of domain argument  should have an odd number of elements.')
 return sigtools._order_filterND(a, domain, rank)

def order_filter ( a , domain , rank ) : domain = asarray ( domain ) size = domain . shape for k in range ( len ( size ) ) : if ( ( size [ k ] % 2 ) != 1 ) : raise ValueError ( 'Each dimension of domain argument  should have an odd number of elements.' ) return sigtools . _order_filterND ( a , domain , rank )
perform an order filter on an n-dimensional array .