def _butter(order, band, rate=44100):
 global _butter_cache
 _h = hash((order, band, rate))
 if (not (_h in _butter_cache)):
  (low, high) = band
  nyqfreq = (float(rate) / 2)
  lowf = (low / nyqfreq)
  highf = (high / nyqfreq)
  _butter_cache[_h] = butter(order, (lowf, highf), btype='band')
 return _butter_cache[_h]

def _butter ( order , band , rate = 44100 ) : global _butter_cache _h = hash ( ( order , band , rate ) ) if ( not ( _h in _butter_cache ) ) : ( low , high ) = band nyqfreq = ( float ( rate ) / 2 ) lowf = ( low / nyqfreq ) highf = ( high / nyqfreq ) _butter_cache [ _h ] = butter ( order , ( lowf , highf ) , btype = 'band' ) return _butter_cache [ _h ]
cache-ing version of scipy .